DocTypeView implements Transform<DocType, String> { @Override public Optional<String> transform(Generator gen, DocType model) { return Optional.of("<!DOCTYPE " + model.getRootType() + '>' ); }  @Override Optional<String> transform(Generator gen, DocType model);  }
@Test void transform() { final Generator generator = Generator.forJava(); final DocTypeView docTypeView = new DocTypeView(); final DocType docType = DocType.of("type"); assertTrue(docTypeView.transform(generator, docType).isPresent()); }