@Test
public void registerToParentCarpaccio() throws Exception {

    Carpaccio carpaccio = mock(Carpaccio.class);
    ViewGroup viewGroup = mock(ViewGroup.class);
    View view = mock(View.class);
    doReturn(viewGroup).when(view).getParent();
    doReturn(carpaccio).when(viewGroup).getParent();
    CarpaccioHelper.registerToParentCarpaccio(view);
    verify(carpaccio, atLeastOnce()).addCarpaccioView(eq(view));
}