use of io.confluent.kafka.schemaregistry.SchemaProvider in project schema-registry by confluentinc.
the class ProtobufSchemaTest method testParseSchemaSuppressException.
@Test
public void testParseSchemaSuppressException() {
SchemaProvider protobufSchemaProvider = new ProtobufSchemaProvider();
Optional<ParsedSchema> parsedSchema = protobufSchemaProvider.parseSchema(invalidSchemaString, new ArrayList<>(), false);
assertFalse(parsedSchema.isPresent());
}
use of io.confluent.kafka.schemaregistry.SchemaProvider in project schema-registry by confluentinc.
the class ProtobufSchemaTest method testParseSchemaThrowException.
@Test(expected = IllegalArgumentException.class)
public void testParseSchemaThrowException() {
SchemaProvider protobufSchemaProvider = new ProtobufSchemaProvider();
protobufSchemaProvider.parseSchemaOrElseThrow(invalidSchemaString, new ArrayList<>(), false);
}
Aggregations