DefaultValueGeneratorManager implements ValueGeneratorManager { @Override public List<ValueGeneratorDto> getAvailableGenerators(Class<? extends AbstractDto> dtoType) { return getAllGenerators() .values() .stream() .filter(generator -> { return !generator.isDisabled() && enabledEvaluator.isEnabled(generator) && (dtoType == null || generator.supports(dtoType)); }) .map(this::toDto) .collect(Collectors.toList()); }  @Override DTO generate(DTO dto); @Override List<ValueGeneratorDto> getAvailableGenerators(Class<? extends AbstractDto> dtoType); @Override Set<Class<? extends AbstractDto>> getSupportedTypes(); @Override boolean supportsGenerating(AbstractDto dto);  }
@Test public void testGeneratorTypes() { List<ValueGeneratorDto> generators = valueGeneratorManager.getAvailableGenerators(null); for (ValueGeneratorDto generator : generators) { try { Class.forName(generator.getDtoType()); Class.forName(generator.getGeneratorType()); } catch (ClassNotFoundException e) { fail(e.getMessage()); } } }
@Test public void testGeneratorTypesForIdentity() { List<ValueGeneratorDto> generators = valueGeneratorManager .getAvailableGenerators(IdmIdentityDto.class); for (ValueGeneratorDto generator : generators) { try { Class.forName(generator.getDtoType()); Class.forName(generator.getGeneratorType()); assertEquals(IdmIdentityDto.class.getCanonicalName(), generator.getDtoType()); } catch (ClassNotFoundException e) { fail(e.getMessage()); } } }