### Question:
HeaderMixin implements Mixin { public CharSequence getText() { final TextView titleView = getTextView(); return titleView != null ? titleView.getText() : null; } HeaderMixin(
      @NonNull TemplateLayout layout, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr); TextView getTextView(); void setText(int title); void setText(CharSequence title); CharSequence getText();  }### Answer:
@SuppressLint("SetTextI18n") @Test public void testGetText() { mHeaderTextView.setText("Lorem ipsum"); HeaderMixin mixin = new HeaderMixin(mTemplateLayout, null, 0); assertEquals("Lorem ipsum", mixin.getText()); }
@SuppressWarnings("ResourceType") @Test public void testSetTextFromXml() throws IOException, XmlPullParserException { final XmlResourceParser parser = mContext.getResources().getXml(R.layout.test_mixin_attributes); while (!TemplateLayout.class.getName().equals(parser.getName())) { parser.next(); } new HeaderMixin(mTemplateLayout, Xml.asAttributeSet(parser), 0); assertEquals("lorem ipsum", mHeaderTextView.getText()); }