@Test public void shouldGetCommentsVisibility() throws Exception { // Our mock post is of the type story, so this should return gone mPost.kids = null; assertEquals(mPostViewModel.getCommentsVisibility(), View.GONE); mPost.kids = new ArrayList<>(); assertEquals(mPostViewModel.getCommentsVisibility(), View.VISIBLE); mPost.kids = null; mPost.postType = Post.PostType.ASK; assertEquals(mPostViewModel.getCommentsVisibility(), View.VISIBLE); }