@Test
public void createCommentPostsToService() {

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