AbstractConfig implements Serializable { protected static void checkPathLength(String property, String value) { checkProperty(property, value, MAX_PATH_LENGTH, null); }  @Parameter(excluded = true) String getId(); void setId(String id); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void checkPathLength() throws Exception { StringBuilder builder = new StringBuilder(); for (int i = 0; i <= 200; i++) { builder.append("a"); } AbstractConfig.checkPathLength("hello", builder.toString()); }