@Test
public void tesSigninShouldBeSuccessfull() {

    doAnswer(new Answer() {
        @Override
        public Object answer(InvocationOnMock invocation) throws Throwable {
            ((LoginCallback) invocation.getArguments()[2]).onLoginSuccess(token);
            return null;
        }
    }).when(api).signin(any(String.class), any(String.class), any(LoginCallback.class));
    TestObserver<Token> testObserver = sut.signin("username", "password").test();
    testObserver.assertValue(new Predicate<Token>() {
        @Override
        public boolean test(Token token) throws Exception {
            return token != null && token.userId().contentEquals("userId")
                    && token.authToken().contentEquals("token");
        }
    });
    testObserver.assertComplete();
    testObserver.assertNoErrors();
}