### Question:
CaseManagementFormGenerationModelProvider implements FormGenerationModelProvider<Definitions> { @Override public Definitions generate(Diagram diagram) throws IOException { return formGenerationModelProviderHelper.generate(diagram); } protected  CaseManagementFormGenerationModelProvider(); @Inject  CaseManagementFormGenerationModelProvider(final DefinitionUtils definitionUtils,
                                                     final CaseManagementFormGenerationModelProviderHelper formGenerationModelProviderHelper); @PostConstruct void init(); @Override boolean accepts(final Diagram diagram); @Override Definitions generate(Diagram diagram);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testGenerateForCaseManagementDirectDiagramMarshaller() throws Exception { when(cmDirectDiagramMarshaller.marshallToBpmn2Definitions(diagram)).thenReturn(definitions); when(cmBackendService.getDiagramMarshaller()).thenReturn(cmDirectDiagramMarshaller); Definitions result = tested.generate(diagram); verify(cmDirectDiagramMarshaller, times(1)).marshallToBpmn2Definitions(eq(diagram)); assertEquals(result, definitions); }