### Question:
ProjectDiagramServiceImpl extends KieService<ProjectDiagram> implements ProjectDiagramService { @Override public boolean delete(final ProjectDiagram diagram) { return controller.delete(diagram); } protected  ProjectDiagramServiceImpl(); @Inject  ProjectDiagramServiceImpl(final DefinitionManager definitionManager,
                                     final FactoryManager factoryManager,
                                     final Instance<DefinitionSetService> definitionSetServiceInstances,
                                     final BackendRegistryFactory registryFactory,
                                     final @Named("ioStrategy") IOService ioService,
                                     final SessionInfo sessionInfo,
                                     final Event<ResourceOpenedEvent> resourceOpenedEvent,
                                     final CommentedOptionFactory commentedOptionFactory,
                                     final KieModuleService moduleService,
                                     final KieServiceOverviewLoader overviewLoader,
                                     final User identity); @PostConstruct void init(); @Override ProjectDiagram getDiagramByPath(final Path path); @Override boolean accepts(final Path path); @Override Path create(final Path path,
                       final String name,
                       final String defSetId,
                       final String projectName,
                       final Package projectPkg,
                       final Optional<String> projectType); @Override Path create(final Path path,
                       final String name,
                       final String defSetId); @Override Path save(final Path path,
                     final ProjectDiagram content,
                     final Metadata metadata,
                     final String comment); @Override Path saveAsXml(final Path path,
                          final String xml,
                          final Metadata metadata,
                          final String comment); @Override ProjectMetadata saveOrUpdate(final ProjectDiagram diagram); @Override Path saveOrUpdateSvg(final Path diagramPath,
                                final String rawDiagramSvg); @Override boolean delete(final ProjectDiagram diagram); @Override void delete(final Path path,
                       final String comment); @Override String getRawContent(final ProjectDiagram diagram);  }### Answer:
@Test public void testDelete() { when(diagramServiceController.delete(diagram)).thenReturn(true); boolean result = diagramService.delete(diagram); verify(diagramServiceController, times(1)).delete(diagram); assertTrue(result); }
@Test public void testDeleteByPath() { String comment = "COMMENT"; diagramService.delete(path, comment); verify(diagramServiceController, times(1)).delete(path, comment); }