I already found out how to test it. There are two things you can do. One is use Mockito and do this:
ArgumentCaptor<OTTOEventClass> captor = ArgumentCaptor
.forClass(OTTOEventClass.class);
then since you hopefully have a bus in your test you can verify that a post to the bus was made with the OTTOEventClass object.
like this:
verify(bus).post(captor.capture());
you could also verify certain flags in your OTTOEventClass are set like this:
assertThat(captor.getValue().isFlagSet(), equalTo(true));
The other thing you can do is just verify that a bus post was called with some type like this:
verify(bus).post(isA(OTTOEventClass.class));
the above just verifies bus.post(new OTTOEventClass())
was called somewhere during your test and that the event that was posted is of type OTTOEventClass.
I dont test the otto subscriber because my tests are about testing my functionality not Otto. Let Otto be tested by square, i dont test framework i test my code & calls and my business logic.