@Test
public void shouldPublishLogoutMessage() {

	SessionID sessionId = mock(SessionID.class);
	clientApplication.onLogout(sessionId);
	await().atMost(FIVE_SECONDS).until(() -> receivedEvents.size() > 0);
	assertThat(receivedEvents.get(0)).isInstanceOf(Logout.class);
	assertThat(((Logout) receivedEvents.get(0)).getSessionId()).isEqualTo(sessionId);
}