@Test
public void testExceptionConvertedToBadRequestExceptionInExecutionHookBypassesCircuitBreaker() {

    TestCircuitBreaker circuitBreaker = new TestCircuitBreaker();
    ExceptionToBadRequestByExecutionHookCommand command =  new ExceptionToBadRequestByExecutionHookCommand(circuitBreaker, ExecutionIsolationStrategy.THREAD);
    try {
        command.execute();
        fail("we expect to receive a " + HystrixBadRequestException.class.getSimpleName());
    } catch (HystrixBadRequestException e) {
        // success
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
        fail("We expect a " + HystrixBadRequestException.class.getSimpleName() + " but got a " + e.getClass().getSimpleName());
    }
    assertCommandExecutionEvents(command, HystrixEventType.BAD_REQUEST);
    assertEquals(0, circuitBreaker.metrics.getCurrentConcurrentExecutionCount());
    assertSaneHystrixRequestLog(1);
}