@Before
public void setUp() throws Exception {
commandBus = spy(new SimpleCommandBus());
mockRepository = mock(Repository.class);
ParameterResolverFactory parameterResolverFactory = MultiParameterResolverFactory.ordered(
ClasspathParameterResolverFactory.forClass(AggregateAnnotationCommandHandler.class),
new ParameterResolverFactory() {
@Override
public ParameterResolver createInstance(Annotation[] memberAnnotations, Class<?> parameterType,
Annotation[] parameterAnnotations) {
if (String.class.equals(parameterType)) {
return new FixedValueParameterResolver<String>("It works");