@Test
public void testSigninShouldFailIfNot2xx() {

    rest.signin("user", "password", loginCallback);
    verify(loginCallback, timeout(DEFAULT_TIMEOUT).only())
            .onError(exceptionCaptor.capture());
    RocketChatException exception = exceptionCaptor.getValue();
    assertThat(exception, is(instanceOf(RocketChatException.class)));
}