ExpandableWrapper { public boolean isParentInitiallyExpanded() { if (!mWrappedParent) { throw new IllegalStateException("Parent not wrapped"); } return mParent.isInitiallyExpanded(); } 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 expandableWrapperIsInitiallyExpandedWhenParentListItemIsInitiallyExpanded() { boolean expected = true; when(mParent.isInitiallyExpanded()).thenReturn(expected); assertEquals(expected, mExpandableWrapper.isParentInitiallyExpanded()); }
@Test public void expandableWrapperIsNotInitiallyExpandedWhenParentListItemIsNotInitiallyExpanded() { boolean expected = false; when(mParent.isInitiallyExpanded()).thenReturn(expected); assertEquals(expected, mExpandableWrapper.isParentInitiallyExpanded()); }