@Test
public void testDisconnectEvent() {

    manager.publishDisconnect(true);
    manager.publishDisconnect(false);
    verify(listener, times(2)).onDisconnect(booleanCaptor.capture());
    assertThat(booleanCaptor.getAllValues().get(0), is(equalTo(true)));
    assertThat(booleanCaptor.getAllValues().get(1), is(equalTo(false)));
}