FieldPage extends BaseDecisionTableColumnPage<T> { void factFieldWarningToggle(final boolean isFactFieldValid) { if (!isFactFieldValid) { view.showSelectFieldWarning(); } else { view.hideSelectFieldWarning(); } } @Inject  FieldPage(final View view,
                     final TranslationService translationService); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void prepareView(); String getFactField();  }
@Test public void testFactFieldWarningToggleWhenFactFieldIsValid() { final boolean isFactFieldValid = true; page.factFieldWarningToggle(isFactFieldValid); verify(view, never()).showSelectFieldWarning(); verify(view).hideSelectFieldWarning(); }
@Test public void testFactFieldWarningToggleWhenFactFieldIsNotValid() { final boolean isFactFieldValid = false; page.factFieldWarningToggle(isFactFieldValid); verify(view).showSelectFieldWarning(); verify(view, never()).hideSelectFieldWarning(); }