ExpandableWrapper { public List<ExpandableWrapper<P, C>> getWrappedChildList() { if (!mWrappedParent) { throw new IllegalStateException("Parent not wrapped"); } return mWrappedChildList; } ExpandableWrapper(@NonNull P parent);  ExpandableWrapper(@NonNull C child); P getParent(); void setParent(@NonNull P parent); C getChild(); boolean isExpanded(); void setExpanded(boolean expanded); boolean isParent(); boolean isParentInitiallyExpanded(); List<ExpandableWrapper<P, C>> getWrappedChildList(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void getChildItemListReturnsEmptyListFromParentListItem() { boolean expected = true; final List<Object> childItemList = new ArrayList<>(); when(mParent.getChildList()).thenReturn(childItemList); mExpandableWrapper = new ExpandableWrapper<>(mParent); assertEquals(expected, mExpandableWrapper.getWrappedChildList().isEmpty()); }