I would refactor this method to have the `this.callable.call()` in a try/catch.
In the catch block you can test for the various expectedException combinations.
This is an over-simplification, but the flow I would expect is something like:
```
T result = null;
try {
result = this.callable.call();
if (expectedValue != null) {
assertThat(result).isEqualTo(this.expectedValue);
}
} catch(Throwable thrown) {
if (expectedException != null) {
...
} else if (expectedExceptionType != null && expectedExceptionCauseType
!= null) {
...
} else if (expectedExceptionType != null) {
...
} else if (expectedExceptionCauseType != null) {
...
} else {
throw thrown;
}
}
```
[ Full content available at: https://github.com/apache/geode/pull/2420 ]
This message was relayed via gitbox.apache.org for [email protected]