ContentElementView implements Transform<ContentElement, String>,
    HasValueView<ContentElement> { @Override public Optional<String> transform(Generator gen, ContentElement model) { if (model.isEscape()) { return transformValue(model); } else { return model.getValue(); } }  @Override Optional<String> transform(Generator gen, ContentElement model);  }
@Test void transform() { final Generator generator = Generator.forJava(); final ContentElementView contentElementView = new ContentElementView(); final ContentElement contentElement = ContentElement.of("element"); assertTrue(contentElementView.transform(generator, contentElement).isPresent()); contentElement.setEscape(false); assertTrue(contentElementView.transform(generator, contentElement).isPresent()); }