private void checkThrown(Throwable actual, Throwable expected) {
      assertThat(actual).isInstanceOf(expected.getClass());

      if (expected.getMessage() != null) {
        assertThat(actual).hasMessage(expected.getMessage());
      }

      if (expected.getCause() != null) {
        checkThrown(actual.getCause(), expected.getCause());
      }
    }
Sets the expected result of running the thread to be a value matching the given value

@param expectedValue the value expected to be returned from the thread. The value must
       implement equals
@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