DefaultGraphRepositoryProducer implements GraphRepositoryProducer { @Override public <E, ID, T extends Repository<E, ID>> T get(Class<T> repositoryClass, Graph manager) { Objects.requireNonNull(repositoryClass, "repository class is required"); Objects.requireNonNull(manager, "manager class is required"); GraphTemplate template = producer.get(manager); GraphRepositoryProxy<T, ID> handler = new GraphRepositoryProxy(template, classMappings, repositoryClass, manager, converter, converters); return (T) Proxy.newProxyInstance(repositoryClass.getClassLoader(), new Class[]{repositoryClass}, handler); }  @Override T get(Class<T> repositoryClass, Graph manager);  }
@Test public void shouldCreateFromManager() { Graph manager= Mockito.mock(Graph.class); GraphRepositoryProxyTest.PersonRepository personRepository = producer.get(GraphRepositoryProxyTest.PersonRepository.class, manager); assertNotNull(personRepository); }