Validator { public boolean isConditionHeaderNotBlank(final ConditionCol52 c) { return !(c.getHeader() == null || c.getHeader().equals("")); } Validator();  Validator(List<CompositeColumn<? extends BaseColumn>> patterns); void addActionPattern(Pattern52 pattern); void removeActionPattern(Pattern52 pattern); boolean arePatternBindingsUnique(); boolean isPatternBindingUnique(Pattern52 pattern); boolean isPatternValid(Pattern52 p); boolean isConditionValid(ConditionCol52 c); boolean isConditionHeaderNotBlank(final ConditionCol52 c); boolean isConditionHeaderUnique(final ConditionCol52 conditionCol52); boolean isConditionOperatorValid(ConditionCol52 c); boolean isActionValid(ActionCol52 c); boolean isActionHeaderValid(ActionCol52 a); void setPatternToActionSetFieldsMap(Map<Pattern52, List<ActionSetFieldCol52>> patternToActionSetFieldsMap); boolean arePatternActionSetFieldsValid(Pattern52 p); void setPatternToActionInsertFactFieldsMap(Map<ActionInsertFactFieldsPattern, List<ActionInsertFactCol52>> patternToActionInsertFactFieldsMap); boolean arePatternActionInsertFactFieldsValid(Pattern52 p); boolean doesOperatorNeedValue(ConditionCol52 c); boolean doesOperatorAcceptValueList(ConditionCol52 c); boolean doesOperatorAcceptCommaSeparatedValues(ConditionCol52 c); boolean isConditionLimitedEntryValueValid(ConditionCol52 c); boolean canPatternBeRemoved(final Pattern52 pattern); boolean isTypeUsed(final String fqcn);  }
@Test public void testIsConditionHeaderNotBlankWhenHeaderIsNull() throws Exception { final Validator validator = new Validator(); final ConditionCol52 col52 = fakeConditionCol52(null); assertFalse(validator.isConditionHeaderNotBlank(col52)); }
@Test public void testIsConditionHeaderNotBlankWhenHeaderIsEmpty() throws Exception { final Validator validator = new Validator(); final ConditionCol52 col52 = fakeConditionCol52(""); assertFalse(validator.isConditionHeaderNotBlank(col52)); }
@Test public void testIsConditionHeaderNotBlankWhenHeaderIsValid() throws Exception { final Validator validator = new Validator(); final ConditionCol52 col52 = fakeConditionCol52("my header"); assertTrue(validator.isConditionHeaderNotBlank(col52)); }