### Question:
ExpandedView extends FrameLayout { public void destroyContent() { animator.cancel(); setVisibility(INVISIBLE); content = null; contentContainer.removeAllViews(); disposable.dispose(); } ExpandedView(@NonNull Context context);  ExpandedView(@NonNull Context context, ExpandedViewCallback callback);  ExpandedView(@NonNull Context context, @Nullable AttributeSet attrs);  ExpandedView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr); void displayPages(List<Page> pages, Page selected, boolean animated); void setSelected(Page selected); void setCallback(ExpandedViewCallback callback); void destroyContentAnimated(@Nullable Runnable runnable); void destroyContent(); @Override boolean dispatchKeyEvent(KeyEvent event); static final int BACGROUND_TRANSPARENT_COLOR_RES; }### Answer:
@Test public void destroyContent() throws Exception { view.destroyContent(); assertEquals(View.INVISIBLE, view.getVisibility()); ViewGroup container = view.findViewById(R.id.content); assertEquals(0, container.getChildCount()); }