CommandErrorCallback extends DefaultErrorCallback { @Override public boolean error(final Message message, final Throwable throwable) { command.execute(); return super.error(message, throwable); } CommandErrorCallback(final Command command); @Override boolean error(final Message message,
                         final Throwable throwable);  }
@Test public void verifyCommandIsRanOnError() throws Exception { final Command command = mock(Command.class); new CommandErrorCallback(command).error(mock(Message.class), mock(org.uberfire.java.nio.file.AccessDeniedException.class)); verify(command).execute(); }