@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
@Test
public void loggerLogsOnExpectedException() throws Exception {
HystrixPlugins.getInstance().registerCommandExecutionHook(new ExceptionLoggingCommandHook(exceptionLogger));
final HystrixCommand<String> failingCommand = new TenacityFailingCommand();
failingCommand.execute();
final List<RuntimeException> loggedExceptions = exceptionLogger.getLoggedExceptions();
assertEquals(1, loggedExceptions.size());
assertTrue(loggedExceptions.get(0).getClass().equals(RuntimeException.class));
}