I have an annotated commandhandler in an aggregate that applies an event and then throws an exception.
My test looks like this:
@Test
public void test() {
fixture.given(STATE)
.when(COMMAND)
.expectException(EXCEPTION)
.expectEvents(EVENT);
}
Instead of the expected exception i get an InvocationTargetException and I get no event.