Axon 3.0 testing expectVoidReturnType no longer available


First off, congratulations to the 3.0 release!

I just tried to switch my code from 3.0-RC1 to 3.0, and noticed, that the expectVoidReturnType method has been removed from the test fixture.

How are we supposed to test for this now? On the other hand, as the command handlers are usually unique, and the fact that it returns “void” is a-priori known makes it useless to test for this fact anyhow? Or o I have to construct a cusom matcher for this scenario now?


Hi Dominic,

the expectVoidReturnType() method is a misleading name, because it suggests that the method should declare a void return type. It doesn’t check that. It checked whether the method returned normally (but in the case of void methods, with a null value).

So in 3.0, this method was renamed to expect expectSuccessfulHandlerExecution().



Thanks, Allard. Thats straight forward and makes sense. Dominic