DefaultColumnRepositoryProducer implements ColumnRepositoryProducer { @Override public <E, ID, T extends Repository<E, ID>> T get(Class<T> repositoryClass, ColumnFamilyManager manager) { Objects.requireNonNull(repositoryClass, "repository class is required"); Objects.requireNonNull(manager, "manager class is required"); ColumnTemplate template = producer.get(manager); return get(repositoryClass, template); }  @Override T get(Class<T> repositoryClass, ColumnFamilyManager manager); @Override T get(Class<T> repositoryClass, ColumnTemplate template);  }
@Test public void shouldCreateFromManager() { ColumnFamilyManager manager= Mockito.mock(ColumnFamilyManager.class); PersonRepository personRepository = producer.get(PersonRepository.class, manager); assertNotNull(personRepository); }
@Test public void shouldCreateFromTemplate() { ColumnTemplate template= Mockito.mock(ColumnTemplate.class); PersonRepository personRepository = producer.get(PersonRepository.class, template); assertNotNull(personRepository); }