@Test
public void propertyNamesFailure() {

    StringSchema propNameSchema = StringSchema.builder()
            .minLength(5)
            .maxLength(7)
            .schemaLocation("#/propertyNames")
            .build();
    ObjectSchema.Builder subject = ObjectSchema.builder()
            .propertyNameSchema(propNameSchema
            );
    TestSupport.failureOf(subject)
            .expectedViolatedSchema(propNameSchema)
            .expectedPointer("#/a")
            .expectedSchemaLocation("#/propertyNames")
            .input(new JSONObject("{\"a\":null}"))
            .expect();
}