MyDecksFooter extends LinearLayout { public void nonEmptyDecksView() { emptyMyDecksMessage.setVisibility(View.GONE); emptyMyDecksTitle.setVisibility(View.GONE); feedbackButton.setVisibility(View.VISIBLE); } MyDecksFooter(Context context);  MyDecksFooter(Context context, AttributeSet attrs);  MyDecksFooter(Context context, AttributeSet attrs, int defStyleAttr); @TargetApi(Build.VERSION_CODES.LOLLIPOP)  MyDecksFooter(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes); void emptyDecksView(); void nonEmptyDecksView();  }
@Test public void shouldUpdateWhenDecksAreInView() { myDecksFooter.nonEmptyDecksView(); assertEquals(View.GONE, myDecksFooter.findViewById(R.id.empty_my_decks_message).getVisibility()); assertEquals(View.GONE, myDecksFooter.findViewById(R.id.empty_my_decks_title).getVisibility()); assertEquals(View.VISIBLE, myDecksFooter.findViewById(R.id.feedback_button).getVisibility()); }