@Test
public void refreshCurrentUserSetsSessionTokenToServiceFactory() {

    when(service.refreshCurrentUser()).thenReturn(Observable.just(user));
    when(user.getSessionToken()).thenReturn("sessionToken");
    TestSubscriber<User> ts = new TestSubscriber<>();
    network.refreshCurrentUser().subscribe(ts);
    assertThat(network.service, equalTo(secondService));
}