### Question:
GraphQLContentValidator implements ContentValidator { @Override public void validate(ValidityLevel level, ContentHandle content) throws InvalidContentException { if (level == ValidityLevel.SYNTAX_ONLY || level == ValidityLevel.FULL) { try { new SchemaParser().parse(content.content()); } catch (Exception e) { throw new InvalidContentException("Syntax violation for GraphQL artifact.", e); } } } GraphQLContentValidator(); @Override void validate(ValidityLevel level, ContentHandle content);  }### Answer:
@Test public void testValidSyntax() throws Exception { ContentHandle content = resourceToContentHandle("graphql-valid.graphql"); GraphQLContentValidator validator = new GraphQLContentValidator(); validator.validate(ValidityLevel.SYNTAX_ONLY, content); }
@Test public void testInvalidSyntax() throws Exception { ContentHandle content = resourceToContentHandle("graphql-invalid.graphql"); GraphQLContentValidator validator = new GraphQLContentValidator(); Assertions.assertThrows(InvalidContentException.class, () -> { validator.validate(ValidityLevel.SYNTAX_ONLY, content); }); }