@Test
public void shouldCallCallbackOnNetworkError() {

    mockServer.shutdown();
    RocketChatVerifier.checkServerVersion(client, baseUrl.toString(), verifier, callback);
    verify(callback, timeout(1000)
            .times(1))
            .onError(exceptionCaptor.capture());
    assertThat(exceptionCaptor.getValue(),
            is(instanceOf(RocketChatNetworkErrorException.class)));
}