PMMLRestResourceGenerator { public PMMLRestResourceGenerator withDependencyInjection(DependencyInjectionAnnotator annotator) { this.annotator = annotator; return this; } PMMLRestResourceGenerator(KiePMMLModel model, String appCanonicalName); String generate(); String getNameURL(); KiePMMLModel getKiePMMLModel(); PMMLRestResourceGenerator withDependencyInjection(DependencyInjectionAnnotator annotator); String className(); String generatedFilePath();  }
@Test void withDependencyInjection() { assertNull(pmmlRestResourceGenerator.annotator); DependencyInjectionAnnotator dependencyInjectionAnnotator = getDependencyInjectionAnnotator(); PMMLRestResourceGenerator retrieved = pmmlRestResourceGenerator.withDependencyInjection(dependencyInjectionAnnotator); assertEquals(pmmlRestResourceGenerator, retrieved); assertEquals(dependencyInjectionAnnotator, pmmlRestResourceGenerator.annotator); }