### Question:
TextField extends LinearLayout { public void setLabelFont(Font font) { TypefaceHelper.setTypeface(label, font); } TextField(final Context context);  TextField(final Context context, final AttributeSet attrs);  TextField(final Context context, final AttributeSet attrs, final int defStyleAttr); @TargetApi(Build.VERSION_CODES.LOLLIPOP)  TextField(final Context context, final AttributeSet attrs, final int defStyleAttr, final int defStyleRes); @Nullable String getLabel(); void setLabel(final String labelText); boolean isHintAnimationEnabled(); void setHintAnimationEnabled(final boolean isEnabled); void setHint(final String hint); @Nullable String getHint(); void setHint(@StringRes final int hint); void setHelper(@Nullable final String helpText); @Nullable String getHelper(); void setHelper(@StringRes final int helpText); void setError(final String error); @Nullable String getError(); void setError(@StringRes final int error); @Override boolean isEnabled(); void setEnabled(final boolean isEnabled); void setText(@Nullable final String text); String getText(); void setText(@StringRes final int text); void setMaxLines(final int maxLines); void setMaxCharacters(final int maxChars); void setCharactersCountVisible(final boolean isVisible); void setEllipsize(final TextUtils.TruncateAt ellipsize); void setInputType(final int type); void addTextChangedListener(final TextWatcher watcher); @Override void setOnClickListener(final OnClickListener listener); void setOnFocusChangeListener(final OnFocusChangeListener listener); EditText getEditText(); void setCompoundDrawables(@DrawableRes final int left,
                                     @DrawableRes final int top,
                                     @DrawableRes final int right,
                                     @DrawableRes final int bottom); void setCompoundDrawables(@Nullable final Drawable left,
                                     @Nullable final Drawable top,
                                     @Nullable final Drawable right,
                                     @Nullable final Drawable bottom); void setPasswordVisibilityToggleDrawable(final Drawable toggleDrawable); void setPasswordVisibilityToggleDrawable(@DrawableRes final int toggleDrawableRes); void setPasswordVisibilityToggleTint(final ColorStateList toggleTint); void setPasswordVisibilityToggleTint(@ColorRes final int toggleTint); void setPasswordVisibilityToggleEnabled(final boolean enabled); void setTextColor(int color); void setTextColor(ColorStateList color); void setHintColor(int color); void setHintColor(ColorStateList color); void setLabelColor(int color); void setLabelColor(ColorStateList color); void setTextSize(float size); void setLabelSize(float size); void setTextFont(Font font); void setLabelFont(Font font); void setTextGravity(int gravity); @Override String toString(); static final double WIDTH_TEXTFIELD_FIX; }### Answer:
@Test public void testSetLabelFont_withValidFont_shouldSetItToTheInput() { textField.setLabelFont(Font.BLACK); final TextView label = ReflectionHelpers.getField(textField, "label"); assertEquals(typefaceSetterMocker.typefaceBlack, label.getTypeface()); }
@Test public void testSetLabelFontREGULAR_withValidFont_shouldSetItToTheInput() { textField.setLabelFont(Font.REGULAR); final TextView label = ReflectionHelpers.getField(textField, "label"); assertEquals(typefaceSetterMocker.typefaceRegular, label.getTypeface()); }
@Test public void testSetLabelFontEXTRA_BOLD_withValidFont_shouldSetItToTheInput() { textField.setLabelFont(Font.EXTRA_BOLD); final TextView label = ReflectionHelpers.getField(textField, "label"); assertEquals(typefaceSetterMocker.typefaceExtraBold, label.getTypeface()); }
@Test public void testSetLabelFontTHIN_withValidFont_shouldSetItToTheInput() { textField.setLabelFont(Font.THIN); final TextView label = ReflectionHelpers.getField(textField, "label"); assertEquals(typefaceSetterMocker.typefaceThin, label.getTypeface()); }