SeparatorConventionCheck extends DoubleDispatchVisitorCheck { @VisibleForTesting void setSeparator(String separator) { this.separator = separator; }  @Override void visitSeparator(SeparatorTree tree); @Override void visitProperty(PropertyTree tree); @Override void validateParameters();  }
@Test public void should_find_separators_not_following_colon_convention_and_raise_issues() { check.setSeparator(":"); JavaPropertiesCheckVerifier.verify(check, CheckTestUtils.getTestFile("separatorConventionColon.properties")); }
@Test public void should_throw_an_illegal_state_exception_as_the_separator_parameter_is_not_valid() { try { check.setSeparator("abc"); JavaPropertiesCheckVerifier.verify(check, CheckTestUtils.getTestFile("separatorConventionColon.properties")); } catch (IllegalStateException e) { assertThat(e.getMessage()).isEqualTo("Check jproperties:separator-convention (Separators should follow a convention): " + "separator parameter is not valid.\nActual: \"abc\"\nExpected: '=' or ':'"); } }