### Question:
CaseManagementProjectDiagramFactory extends BindableDiagramFactory<ProjectMetadata, ProjectDiagram> { @Override public ProjectDiagram build(final String name, final ProjectMetadata metadata, final Graph<DefinitionSet, ?> graph) { return bpmnDiagramFactory.build(name, metadata, graph); } protected  CaseManagementProjectDiagramFactory(); @Inject  CaseManagementProjectDiagramFactory(final BPMNProjectDiagramFactory bpmnDiagramFactory); @PostConstruct void init(); @Override Class<? extends Metadata> getMetadataType(); @Override ProjectDiagram build(final String name,
                                final ProjectMetadata metadata,
                                final Graph<DefinitionSet, ?> graph);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testBuild() { factory.init(); factory.build("diagram1", metadata, graph); verify(bpmnDiagramFactory, times(1)).build(eq("diagram1"), eq(metadata), eq(graph)); }