lundi 17 septembre 2018

AxonFramework: How to test @EventHandler

I have this component which integrates with other services through a RabbitMQ queue:

@Component
@ProcessingGroup("amqpProcessor")
public class ExternalEventsHandler {

   @EventHandler
    public void on(SomeOtherServiceEvent event) {
        // Dispatches some command 
    }

}

How should I test this?

@Test
public void shouldReactToSomeOtherServiceEvent() {
    //TODO
}

Aucun commentaire:

Enregistrer un commentaire