NavigationBarMixin implements Mixin { public CharSequence getNextButtonText() { return getNavigationBar().getNextButton().getText(); } NavigationBarMixin(TemplateLayout layout); NavigationBar getNavigationBar(); void setNextButtonText(int text); void setNextButtonText(CharSequence text); CharSequence getNextButtonText(); void setNavigationBarListener(NavigationBarListener listener);  }
@SuppressLint("SetTextI18n") @Test public void testGetNextButtonText() { mNavigationBar.getNextButton().setText("lorem ipsum"); NavigationBarMixin mixin = new NavigationBarMixin(mTemplateLayout); assertSame("lorem ipsum", mixin.getNextButtonText()); }