@Test
void withDependencyInjection() {

    assertNull(pmmlRestResourceGenerator.annotator);
    DependencyInjectionAnnotator dependencyInjectionAnnotator = getDependencyInjectionAnnotator();
    PMMLRestResourceGenerator retrieved =
            pmmlRestResourceGenerator.withDependencyInjection(dependencyInjectionAnnotator);
    assertEquals(pmmlRestResourceGenerator, retrieved);
    assertEquals(dependencyInjectionAnnotator, pmmlRestResourceGenerator.annotator);
}