### Question:
CaseManagementDirectDiagramMarshaller extends BaseDirectDiagramMarshaller { @Override protected CaseManagementConverterFactory createToStunnerConverterFactory(final DefinitionResolver definitionResolver, final TypedFactoryManager typedFactoryManager) { return new CaseManagementConverterFactory(definitionResolver, typedFactoryManager); } @Inject  CaseManagementDirectDiagramMarshaller(final XMLEncoderDiagramMetadataMarshaller diagramMetadataMarshaller,
                                                 final DefinitionManager definitionManager,
                                                 final RuleManager ruleManager,
                                                 final WorkItemDefinitionLookupService workItemDefinitionService,
                                                 final FactoryManager factoryManager,
                                                 final GraphCommandFactory commandFactory,
                                                 final GraphCommandManager commandManager);   }### Answer:
@Test public void testCreateToStunnerConverterFactory() throws Exception { Definitions definitions = bpmn2.createDefinitions(); definitions.getRootElements().add(bpmn2.createProcess()); BPMNDiagram bpmnDiagram = di.createBPMNDiagram(); bpmnDiagram.setPlane(di.createBPMNPlane()); definitions.getDiagrams().add(bpmnDiagram); DefinitionResolver definitionResolver = new DefinitionResolver(definitions, Collections.emptyList()); FactoryManager factoryManager = mock(FactoryManager.class); TypedFactoryManager typedFactoryManager = new TypedFactoryManager(factoryManager); assertTrue(org.kie.workbench.common.stunner.cm.backend.converters.tostunner.CaseManagementConverterFactory.class.isInstance( tested.createToStunnerConverterFactory(definitionResolver, typedFactoryManager))); }