### Question:
ErrorView extends LinearLayout { public void setSubtitle(@Nullable final String subtitleText) { if (subtitleText == null) { subtitle.setText(null); subtitle.setVisibility(GONE); } else { subtitle.setText(subtitleText); subtitle.setVisibility(VISIBLE); } } ErrorView(final Context context);  ErrorView(final Context context, final AttributeSet attrs);  ErrorView(final Context context, final AttributeSet attrs, final int defStyleAttr); @TargetApi(Build.VERSION_CODES.LOLLIPOP)  ErrorView(final Context context, final AttributeSet attrs, final int defStyleAttr, final int defStyleRes); void setImage(@DrawableRes final int drawable); void setImage(@DrawableRes final int drawable, @Nullable final String contentDescription); void setTitle(@Nullable final String titleText); void setTitle(@StringRes final int resId); void setSubtitle(@Nullable final String subtitleText); void setSubtitle(@StringRes final int resId); void setButton(@Nullable final String buttonLabel, @Nullable final OnClickListener onClickListener); void setButton(@StringRes final int resId, @Nullable final OnClickListener onClickListener); @Override String toString();  }### Answer:
@Test public void testCustomSubtitle() { assertEquals("The ErrorView subtitle should be gone", View.GONE, subtitle.getVisibility()); errorView.setSubtitle(null); assertEquals("The ErrorView subtitle should be gone", View.GONE, subtitle.getVisibility()); errorView.setSubtitle(TEST_TEXT); assertEquals("The ErrorView subtitle should be visible", View.VISIBLE, subtitle.getVisibility()); }