DefaultColumnRepositoryAsyncProducer implements ColumnRepositoryAsyncProducer { @Override public <E, ID, T extends RepositoryAsync<E, ID>> T get(Class<T> repositoryClass, ColumnFamilyManagerAsync manager) { Objects.requireNonNull(repositoryClass, "repository class is required"); Objects.requireNonNull(manager, "manager class is required"); ColumnTemplateAsync template = producer.get(manager); return get(repositoryClass, template); }  @Override T get(Class<T> repositoryClass, ColumnFamilyManagerAsync manager); @Override T get(Class<T> repositoryClass, ColumnTemplateAsync template);  }
@Test public void shouldCreateFromManager() { ColumnFamilyManagerAsync manager= Mockito.mock(ColumnFamilyManagerAsync.class); PersonRepositoryAsync personRepository = producer.get(PersonRepositoryAsync.class, manager); assertNotNull(personRepository); }
@Test public void shouldCreateFromTemplate() { ColumnTemplateAsync template= Mockito.mock(ColumnTemplateAsync.class); PersonRepositoryAsync personRepository = producer.get(PersonRepositoryAsync.class, template); assertNotNull(personRepository); }