@Test
public void sendAnalyticsCallsService() {

    when(service.sendAnalytics()).thenReturn(Observable.<Void>empty());
    TestSubscriber<Void> ts = new TestSubscriber<>();
    network.sendAnalytics().subscribe(ts);
    ts.assertNoErrors();
    ts.assertCompleted();
}