public ConcurrentOperation expectException(Throwable expectedException) {
      if (expectedResultIsSet) {
        throw new IllegalArgumentException("Specify only one expected outcome.");
      }

      this.expectedException = expectedException;
      expectedResultIsSet = true;
      return this;
    }
Sets the expected result of running the thread to be an exception matching the given
exception

@param expectedException the expected exception. If the message is null, the message of the
       thrown exception will not be checked, however if the message is empty, the thrown
       exception
       must also have a null or empty message.
@return this, the ConcurrentOperation (containing a callable) that has been set to repeat
geode-junit/src/main/java/org/apache/geode/test/junit/rules/ConcurrencyRule.java