### Question:
DiagramTypeClientProjectService implements DiagramTypeClientService { protected void onSessionClosed(@Observes final SessionDestroyedEvent event) { projectTypeRegistry.remove(getDiagramId(event.getMetadata())); } DiagramTypeClientProjectService(); @Inject  DiagramTypeClientProjectService(Caller<BPMNDiagramService> bpmnDiagramService); @Override void loadDiagramType(Metadata metadata); @Override ProjectType getProjectType(final Metadata metadata);  }### Answer:
@Test public void onSessionClosed() { tested.loadDiagramType(metadata); ProjectType projectType = tested.getProjectType(metadata); assertThat(projectType).isEqualTo(ProjectType.CASE); tested.onSessionClosed(sessionDestroyedEvent); projectType = tested.getProjectType(metadata); assertThat(projectType).isEqualTo(ProjectType.BPMN); }