NamingConvensionValidation implements ValidateInterface<String> { public void check(String input) throws AbstractValidationException { if (!Character.isJavaIdentifierStart(input.charAt(0))) { throw new IllegalNamingConversionException(input); } for (int i = 1; i < input.length(); ++i) { if (!Character.isJavaIdentifierPart(input.charAt(i))) { throw new IllegalNamingConversionException(input); } } }  void check(String input);  }
@Test(expectedExceptions = IllegalNamingConversionException.class) public void check1() throws AbstractValidationException { String name = " variable"; validator.check(name); }
@Test(expectedExceptions = IllegalNamingConversionException.class) public void check2() throws AbstractValidationException { String name = "v')(ariable"; validator.check(name); }