@Test public void schemaWithPii() throws Exception { Schema schema = SchemaBuilder.builder().stringBuilder().prop(SENSITIVITY, PII).endString(); try { underTest.onVisit(schema, breadcrumb); fail(); } catch (InvalidPiiAnnotationException e) { assertThat(e.getPath(), is("/a/b")); } }
@Override public void onVisit(Schema schema, Collection<String> breadcrumb) { if (PII.equalsIgnoreCase(schema.getProp(SENSITIVITY))) { throw new InvalidPiiAnnotationException(breadcrumb); } }
PiiVisitor implements Visitor<T> { @Override public void onVisit(Schema schema, Collection<String> breadcrumb) { if (PII.equalsIgnoreCase(schema.getProp(SENSITIVITY))) { throw new InvalidPiiAnnotationException(breadcrumb); } } }
PiiVisitor implements Visitor<T> { @Override public void onVisit(Schema schema, Collection<String> breadcrumb) { if (PII.equalsIgnoreCase(schema.getProp(SENSITIVITY))) { throw new InvalidPiiAnnotationException(breadcrumb); } }  }
PiiVisitor implements Visitor<T> { @Override public void onVisit(Schema schema, Collection<String> breadcrumb) { if (PII.equalsIgnoreCase(schema.getProp(SENSITIVITY))) { throw new InvalidPiiAnnotationException(breadcrumb); } }  @Override void onVisit(Schema schema, Collection<String> breadcrumb); @Override void onVisit(Field field, Collection<String> breadcrumb); @Override T getResult(); }
PiiVisitor implements Visitor<T> { @Override public void onVisit(Schema schema, Collection<String> breadcrumb) { if (PII.equalsIgnoreCase(schema.getProp(SENSITIVITY))) { throw new InvalidPiiAnnotationException(breadcrumb); } }  @Override void onVisit(Schema schema, Collection<String> breadcrumb); @Override void onVisit(Field field, Collection<String> breadcrumb); @Override T getResult(); static final String SENSITIVITY; static final String PII; }