@Test
public void refreshCurrentUserReturnsUserFromService() {

    when(service.refreshCurrentUser()).thenReturn(Observable.just(user));
    TestSubscriber<User> ts = new TestSubscriber<>();
    network.refreshCurrentUser().subscribe(ts);
    assertThat(ts.getOnNextEvents(), hasItems(user));
}