WorkbenchCloseHandlerImpl implements WorkbenchCloseHandler { @Override public void onWindowClose(final Command command) { if (command != null) { command.execute(); } }  @Override void onWindowClosing(final ParameterizedCommand<Window.ClosingEvent> command); @Override void onWindowClosing(final ParameterizedCommand<Window.ClosingEvent> command,
                                final Window.ClosingEvent event); @Override void onWindowClose(final Command command);  }
@Test public void onWindowCloseEventTest() { final Command command = mock(Command.class); workbenchCloseHandler.onWindowClose(command); verify(command).execute(); }