boolean threwException = false;
try {
response = template.requestBodyAndHeader("direct:conditional", "Kaboom", "jedi", "This isn't the Exception you are looking for...", String.class);
} catch (Throwable e) {
threwException = true;
CamelExecutionException cee = assertIsInstanceOf(CamelExecutionException.class, e);
Throwable cause = cee.getCause();
assertIsInstanceOf(FlakyException.class, cause);
}
assertTrue(threwException);
assertNull(response);