### Question:
DMNDiagramsSessionState { Optional<Diagram> getCurrentDiagram() { final String currentDiagramId = getCurrentDMNDiagramElement().map(e -> e.getId().getValue()).orElse(""); return Optional.ofNullable(diagramsByDiagramId.get(currentDiagramId)); } @Inject  DMNDiagramsSessionState(final DMNDiagramUtils dmnDiagramUtils); Diagram getDRGDiagram();  }### Answer:
@Test public void testGetCurrentDiagram() { sessionState.setCurrentDMNDiagramElement(dmnDiagram1); final Optional<Diagram> actual = sessionState.getCurrentDiagram(); assertTrue(actual.isPresent()); assertEquals(stunnerDiagram1, actual.get()); }