### Question:
ErrorView extends LinearLayout { public void setTitle(@Nullable final String titleText) { if (titleText == null) { title.setText(null); title.setVisibility(GONE); } else { title.setText(titleText); title.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 testCustomTitle() { assertEquals("The ErrorView title should be gone", View.GONE, title.getVisibility()); errorView.setTitle(null); assertEquals("The ErrorView title should be gone", View.GONE, title.getVisibility()); errorView.setTitle(TEST_TEXT); assertEquals("The ErrorView title should be visible", View.VISIBLE, title.getVisibility()); }