class DefaultGraphTemplateProducer implements GraphTemplateProducer {

    @Override
    public GraphTemplate get(Graph graph) {
        requireNonNull(graph, "graph is required");

        SingleInstance<Graph> instance = new SingleInstance<>(graph);

        GraphConverter converter = new DefaultGraphConverter(classMappings,
                converters,
                instance);
        GraphWorkflow workflow = new DefaultGraphWorkflow(persistManager, converter);
        return new DefaultGraphTemplate(instance, classMappings, converter, workflow);
    }

}