@Test
public void retrieveUserReturnsUserFromService() {

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