EnterDeckTitleActivity extends AddDeckActivity implements EnterDeckTitlePresenter.EnterDeckTitleView { @Override public void updateNextButton(boolean buttonClickable, int buttonTextColor, int buttonArrow) { nextButton.setClickable(buttonClickable); nextButtonText.setTextColor(ContextCompat.getColor(this, buttonTextColor)); nextButtonImage.setBackgroundResource(buttonArrow); }  @Override void inflateView(); @Override void setBitmapsForActivity(); @Override void initStates(); @Override void updateNextButton(boolean buttonClickable, int buttonTextColor, int buttonArrow); @Override void setDeckTitleText(String deckTitle);  }
@Test public void updateNextButton() { boolean buttonClickable = true; int buttonColor = R.color.primaryTextColor; int buttonArrow = R.drawable.forward_arrow; activity.updateNextButton(buttonClickable, buttonColor, buttonArrow); View nextButton = activity.findViewById(R.id.enter_deck_title_next_label); TextView nextButtonText = (TextView) activity.findViewById(R.id.enter_deck_title_next_text); ImageView nextButtonImage = findImageView(activity, R.id.enter_deck_title_next_image); assertEquals(buttonClickable, nextButton.isClickable()); assertEquals(ContextCompat.getColor(activity, buttonColor), nextButtonText.getCurrentTextColor()); assertEquals(buttonArrow, shadowOf(nextButtonImage.getBackground()).getCreatedFromResId()); }