@Test
public void createSocialConnectionsReturnsUsersFromService() {

    SocialConnections connections = mock(SocialConnections.class);
    when(usersFeed.getUsers()).thenReturn(users);
    when(service.createSocialConnections(connections)).thenReturn(Observable.just(usersFeed));
    TestSubscriber<List<User>> ts = new TestSubscriber<>();
    network.createSocialConnections(connections).subscribe(ts);
    assertThat(ts.getOnNextEvents(), hasItems(users));
}