### Question:
PersistorFactory { public <BEAN> Persistor<BEAN> generate(final ClassDescriptor<BEAN> classMap) throws Exception { for (final PersistorGenerator generator : persistors) { if (generator.applicableFor(classMap.getMappedClass())) { return generator.generate(classMap, typeFactory); } } throw new RuntimeException("Not possible to find a valid persistor for Class [" + classMap.getClass() + "]. Does it has a public constructor with no parameters?"); } PersistorFactory(final TypeConverterFactory typeFactory); Persistor<BEAN> generate(final ClassDescriptor<BEAN> classMap);  }### Answer:
@Test public void should_use_immutables_generator() throws Exception { final Persistor<ImmutableFoobarValue> persistor = factory.generate(new ClassDescriptorBuilderImpl<>(ImmutableFoobarValue.class).build()); assertTrue(persistor instanceof PersistorImmutables); }
@Test public void should_use_bean_generator() throws Exception { final Persistor<Employee> persistor = factory.generate(new ClassDescriptorBuilderImpl<>(Employee.class).build()); assertTrue(persistor instanceof PersistorBean); }