@Test
void apply() throws InstantiationException {

    final Injector injector = Injector.builder()
            .withComponent(StandardJavaLanguageNamer.class)
            .withComponent(StandardJavaGenerator.class)
            .withComponent(DelegateInfoComponent.class)
            .withBundle(EnumGeneratorBundle.class)
            .build();
    final Project project = TestUtil.project();
    final Column column = DocumentDbUtil.referencedColumn(project,"speedment_test","speedment_test", "user", "name");
    final Table table = column.getParentOrThrow();
    final GeneratedEntityDecorator decorator = new GeneratedEntityDecorator(injector);
    final JavaClassTranslator<Table, Interface> translator = new GeneratedEntityTranslator(injector, table);
    decorator.apply(translator);
    final File file = translator.get();
    final String code = injector.getOrThrow(Generator.class).on(file).orElseThrow(NoSuchElementException::new);
    assertTrue(code.contains("enum Name"));
    assertTrue(code.contains("fromDatabase(String"));
}