AbstractConfig implements Serializable { protected static void checkName(String property, String value) { checkProperty(property, value, MAX_LENGTH, PATTERN_NAME); }  @Parameter(excluded = true) String getId(); void setId(String id); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void checkName() throws Exception { AbstractConfig.checkName("hello", "world%"); }