### Question:
InstantiatorErrors { static Errors illegalConstructor(Errors errors, Class<?> klass, String message) { return errors.addMessage( "%s has an illegal constructor%s", klass, message == null ? "" : ": " + message); }    }### Answer:
@Test public void illegalConstructor1() { check( "class java.lang.String has an illegal constructor: hello", InstantiatorErrors.illegalConstructor( new Errors(), String.class, "hello")); }
@Test public void illegalConstructor2() { check( "class java.lang.String has an illegal constructor", InstantiatorErrors.illegalConstructor( new Errors(), String.class, null)); }