### Question:
ProtobufFdContentValidator implements ContentValidator { @Override public void validate(ValidityLevel level, ContentHandle artifactContent) throws InvalidContentException { if (level == ValidityLevel.FULL) { try { Serde.Schema.parseFrom(artifactContent.bytes()); } catch (Exception e) { throw new InvalidContentException("Content violation for ProtobufFD artifact.", e); } } } ProtobufFdContentValidator(); @Override void validate(ValidityLevel level, ContentHandle artifactContent);  }### Answer:
@Test public void testValidProtobufFdContent() { TestCmmn.UUID uuid = TestCmmn.UUID.newBuilder() .setLsb(77) .setMsb(23) .build(); ContentHandle content = ContentHandle.create(toSchemaProto(uuid.getDescriptorForType().getFile()).toByteArray()); ProtobufFdContentValidator validator = new ProtobufFdContentValidator(); validator.validate(ValidityLevel.FULL, content); }
@Test public void testInvalidProtobufFdContent() { ContentHandle content = ContentHandle.create("qwerty"); ProtobufFdContentValidator validator = new ProtobufFdContentValidator(); Assertions.assertThrows(InvalidContentException.class, () -> { validator.validate(ValidityLevel.FULL, content); }); }