@Test
public void createLikeReturnsLikeFromService() {

    String id = "postId";
    Like like = mock(Like.class);
    when(service.createLike(id)).thenReturn(Observable.just(like));
    TestSubscriber<Like> ts = new TestSubscriber<>();
    network.createLike(id).subscribe(ts);
    assertThat(ts.getOnNextEvents(), hasItems(like));
}