@Test public void piiStringField() throws Exception { Schema schema = SchemaBuilder .record("r") .fields() .name("f") .prop(SENSITIVITY, PII) .type(SchemaBuilder.builder().stringType()) .noDefault() .endRecord(); doReturn(schema).when(delegate).getSchema(1); Schema result = underTest.getSchema(1); assertThat(result.getField("f").schema().getProp("logicalType"), is("pii-string")); }
@Override public Schema getSchema(int version) { return cache.getUnchecked(version); }
PiiLogicalTypeSchemaLookup implements SchemaLookup { @Override public Schema getSchema(int version) { return cache.getUnchecked(version); } }
PiiLogicalTypeSchemaLookup implements SchemaLookup { @Override public Schema getSchema(int version) { return cache.getUnchecked(version); } @Autowired  PiiLogicalTypeSchemaLookup(SchemaLookup delegate); }
PiiLogicalTypeSchemaLookup implements SchemaLookup { @Override public Schema getSchema(int version) { return cache.getUnchecked(version); } @Autowired  PiiLogicalTypeSchemaLookup(SchemaLookup delegate); @Override Schema getSchema(int version); }
PiiLogicalTypeSchemaLookup implements SchemaLookup { @Override public Schema getSchema(int version) { return cache.getUnchecked(version); } @Autowired  PiiLogicalTypeSchemaLookup(SchemaLookup delegate); @Override Schema getSchema(int version);  }