### Question:
DecisionNavigatorObserver { void onCanvasElementAdded(final @Observes CanvasElementAddedEvent event) { getOptionalPresenter().ifPresent(DecisionNavigatorPresenter::refresh); }  void init(final DecisionNavigatorPresenter presenter);  }### Answer:
@Test public void testOnCanvasElementAdded() { observer.init(presenter); observer.onCanvasElementAdded(new CanvasElementAddedEvent(canvasHandler, element)); verify(presenter).refresh(); }