@Test
  void closeStageFailSecondModule() {
    robot.interact(() -> {
      workbench.openModule(first);
      workbench.openModule(second);

      // make sure closing of the stage gets interrupted, if destroy returns false on a module
      when(second.destroy()).thenReturn(false);

      // simulate closing of the stage by pressing the X of the application
      closeStage();

      // all open modules should get closed before the application ends
      InOrder inOrder = inOrder(first, second);
      // Call: workbench.openModule(first)
      inOrder.verify(first).init(workbench);
      inOrder.verify(first).activate();
      // Call: workbench.openModule(second)
      inOrder.verify(first).deactivate();
      inOrder.verify(second).init(workbench);
      inOrder.verify(second).activate();

      // Effects caused by "Workbench#setupCleanup" -> setOnCloseRequest
      // Implicit Call: workbench.closeModule(first)
      inOrder.verify(first, never()).deactivate();
      inOrder.verify(first).destroy(); // returns true
      // Implicit Call: workbench.closeModule(second)
      inOrder.verify(second).deactivate();
      inOrder.verify(second).destroy(); // returns false
      // second should stay as the active module
      inOrder.verify(second).activate();
      // closing should be interrupted

      ignoreModuleGetters(first, second);
      verifyNoMoreInteractions(first, second);

      assertEquals(1, workbench.getOpenModules().size());
      assertEquals(second, workbench.getOpenModules().get(0));
    });
  }
Test for {@link Workbench#setupCleanup()}.
Simulates the first (inactive) module returning {@code true} and the second (active) module
returning {@code false}, when {@link WorkbenchModule#destroy()} is being called on them during
cleanup.
workbenchfx-core/src/test/java/com/dlsc/workbenchfx/WorkbenchTest.java