### Question:
ProtobufContentValidator implements ContentValidator { @Override public void validate(ValidityLevel level, ContentHandle artifactContent) throws InvalidContentException { if (level == ValidityLevel.SYNTAX_ONLY || level == ValidityLevel.FULL) { try { ProtobufFile.toProtoFileElement(artifactContent.content()); } catch (Exception e) { throw new InvalidContentException("Syntax violation for Protobuf artifact.", e); } } } ProtobufContentValidator(); @Override void validate(ValidityLevel level, ContentHandle artifactContent);  }### Answer:
@Test public void testValidProtobufSchema() throws Exception { ContentHandle content = resourceToContentHandle("protobuf-valid.proto"); ProtobufContentValidator validator = new ProtobufContentValidator(); validator.validate(ValidityLevel.SYNTAX_ONLY, content); }
@Test public void testInvalidProtobufSchema() throws Exception { ContentHandle content = resourceToContentHandle("protobuf-invalid.proto"); ProtobufContentValidator validator = new ProtobufContentValidator(); Assertions.assertThrows(InvalidContentException.class, () -> { validator.validate(ValidityLevel.SYNTAX_ONLY, content); }); }