@Test
public void should_throw_an_illegal_state_exception_as_the_format_parameter_is_not_valid() {

  try {
    check.setFormat("(");
    CssCheckVerifier.issuesOnCssFile(check, CheckTestUtils.getCommonTestFile("selectorNamingConvention/selectorNamingConvention.css")).noMore();
  } catch (IllegalStateException e) {
    assertThat(e.getMessage()).isEqualTo("Check css:selector-naming-convention (Selectors should follow a naming convention): "
      + "format parameter \"(\" is not a valid regular expression.");
  }
}