### Question:
CaseManagementDiagramNewResourceHandler extends AbstractProjectDiagramNewResourceHandler<CaseManagementDiagramResourceType> { @Override public void acceptContext(Callback<Boolean, Void> callback) { caseHelper.acceptContext(callback); } protected  CaseManagementDiagramNewResourceHandler(); @Inject  CaseManagementDiagramNewResourceHandler(final DefinitionManager definitionManager,
                                                   final ClientProjectDiagramService projectDiagramServices,
                                                   final BusyIndicatorView indicatorView,
                                                   final CaseManagementDiagramResourceType projectDiagramResourceType,
                                                   final AuthorizationManager authorizationManager,
                                                   final SessionInfo sessionInfo,
                                                   final CaseHelper caseHelper); @Override String getDescription(); @Override IsWidget getIcon(); @Override boolean canCreate(); @Override List<Profile> getProfiles(); @Override void createDiagram(Package pkg, String name, NewResourcePresenter presenter, Path path, String setId,
                              String moduleName, Optional<String> projectType); @Override void acceptContext(Callback<Boolean, Void> callback);  }### Answer:
@Test public void acceptContext_true() { when(bpmnDiagramService.getProjectType(rootPath)).thenReturn(ProjectType.CASE); tested.acceptContext(callback); verify(bpmnDiagramService).getProjectType(rootPath); verify(callback).onSuccess(true); }
@Test public void acceptContext_false() { when(bpmnDiagramService.getProjectType(rootPath)).thenReturn(ProjectType.BPMN); tested.acceptContext(callback); verify(bpmnDiagramService).getProjectType(rootPath); verify(callback, never()).onSuccess(anyBoolean()); }