code: public final void execute() {
          try {
              Matcher<R> matcher = createMatcher();
              R result;
              if (input == null && timeout == null) {
                  result = getExpect().expect(matcher);
              } else if (timeout == null) {
                  result = getExpect().expectIn(input, matcher);
              } else if (input == null) {
                  result = getExpect().expect(timeout, matcher);
              } else {
                  result = getExpect().expectIn(input, timeout, matcher);
              }
              exportSuccessfulResult(resultPrefix, result);
          } catch (IOException e) {
              throw new BuildException(e);
          }
      }
docs: Creates a matcher by calling {@link #createMatcher()} method and executes the expect
  operation.