@Test
public void testFindParentOfClass() throws Exception {

    LinearLayout linearLayout = mock(LinearLayout.class);
    ViewGroup viewGroup = mock(ViewGroup.class);
    View view = mock(View.class);
    doReturn(viewGroup).when(view).getParent();
    doReturn(linearLayout).when(viewGroup).getParent();
    assertEquals(linearLayout, CarpaccioHelper.findParentOfClass(view, LinearLayout.class));
}