ProtobufSchema implements Schema, ProvidesAlias, ProvidesValidations { @Override public StructType getSchema() { return schema; }  @Override void configure(Config config); @Override String getAlias(); @Override StructType getSchema(); @Override Validations getValidations(); Descriptors.Descriptor getDescriptor(); static final String DESCRIPTOR_FILEPATH_CONFIG; static final String DESCRIPTOR_MESSAGE_CONFIG; static final String ALIAS; }
@Test public void getSchema() { Map<String, Object> configMap = new HashMap<>(); configMap.put(ComponentFactory.TYPE_CONFIG_NAME, "protobuf"); configMap.put(ProtobufSchema.DESCRIPTOR_FILEPATH_CONFIG, TestProtobufSchema.class.getResource(SINGLE_EXAMPLE).getPath()); Config config = ConfigFactory.parseMap(configMap); ProtobufSchema schema = new ProtobufSchema(); assertNoValidationFailures(schema, config); schema.configure(config); assertThat(schema.getSchema(), is(TestProtobufUtils.SINGLE_SCHEMA)); }