@Test
public void updateCurrentUserCreatesNewService() {

    when(service.updateCurrentUser(user)).thenReturn(Observable.just(user));
    when(user.getSessionToken()).thenReturn("sessionToken");
    TestSubscriber<User> ts = new TestSubscriber<>();
    network.updateCurrentUser(user).subscribe(ts);
    verify(serviceFactory).setSessionToken("sessionToken");
}