@Test
public void emailLoginSetsSessionTokenToServiceFactory() {

    when(user.getSessionToken()).thenReturn("sessionToken");
    TestSubscriber<User> ts = new TestSubscriber<>();
    network.loginWithEmail(EMAIL, PASSWORD).subscribe(ts);
    verify(serviceFactory).setSessionToken("sessionToken");
}