### Question:
ButtonFooterMixin implements Mixin { public Button addButton(CharSequence text, @StyleRes int theme) { Button button = createThemedButton(context, theme); button.setText(text); return addButton(button); } ButtonFooterMixin(TemplateLayout layout); Button addButton(CharSequence text, @StyleRes int theme); Button addButton(@StringRes int text, @StyleRes int theme); Button addButton(Button button); View addSpace(); void removeButton(Button button); void removeSpace(View space); void removeAllViews();  }### Answer:
@Test public void testAddButton() { ButtonFooterMixin mixin = new ButtonFooterMixin(mTemplateLayout); final Button button = mixin.addButton("foobar", R.style.SuwGlifButton_Primary); assertNotNull(button); @IdRes final int id = 12345; button.setId(id); assertNotNull(mStubParent.findViewById(id)); assertEquals("foobar", button.getText()); assertEquals(dp2Px(16), button.getPaddingLeft()); assertEquals(dp2Px(16), button.getPaddingRight()); }
@Test public void testAddButtonTextRes() { ButtonFooterMixin mixin = new ButtonFooterMixin(mTemplateLayout); final Button button = mixin.addButton(R.string.suw_next_button_label, R.style.SuwGlifButton_Primary); assertNotNull(button); button.setTag("button"); assertNotNull(mStubParent.findViewWithTag("button")); assertEquals("Next", button.getText()); assertEquals(dp2Px(16), button.getPaddingLeft()); assertEquals(dp2Px(16), button.getPaddingRight()); }