### Question:
Aggregator { @OnTransit public void onMessage(State state, String message){ state.setLastMessage(message); }  @OnTransit void onMessage(State state, String message);  }### Answer:
@Test public void testState() throws IllegalAccessException, InstantiationException, NoSuchAlgorithmException { helper.send("test"); verify(mock, timeout(3000)).onMessage(any(State.class), anyString()); assertThat(states, should(containStateFor(Constants.Keys.ALL)) .whileWaitingUntil(timeoutHasExpired(3000))); }