CollectionView extends FrameLayout { void showContent() { refreshLayout.setRefreshing(false); } CollectionView(
      @NonNull Context context,
      @Nullable AttributeSet attrs); @SuppressWarnings("unchecked") @Override void onAttachedToWindow(); @Override void onDetachedFromWindow(); void setAdapter(@NonNull Adapter adapter);  }
@Test public void testShowContent() throws Exception { tested.showLoading(); tested.showContent(); assertThat(tested.refreshLayout.isRefreshing()).isFalse(); assertThat(tested.getChildCount()).isEqualTo(1); }