@Test
public void loginWithEmailReturnsUserFromService() {

    TestSubscriber<User> ts = new TestSubscriber<>();
    network.loginWithEmail(EMAIL, PASSWORD).subscribe(ts);
    assertThat(ts.getOnNextEvents(), hasItems(user));
}