public static void handleException(Throwable throwable, FlowControlResult result) {
        EXCEPTION_HANDLER_MANAGER.apply(throwable, result);
    }
@Test
    public void testExceptionHandler() {
        final FlowControlResult flowControlResult = new FlowControlResult();
        FlowControlExceptionUtils
                .handleException(BulkheadFullException.createBulkheadFullException(Bulkhead.ofDefaults(RULE_NAME)),
                        flowControlResult);
        Assert.assertEquals("Bulkhead is full and does not permit further calls!",
                flowControlResult.getResponse().getMsg());

        FlowControlExceptionUtils
                .handleException(RequestNotPermitted.createRequestNotPermitted(RateLimiter.ofDefaults(RULE_NAME)),
                        flowControlResult);
        Assert.assertEquals("Rate Limited", flowControlResult.getResponse().getMsg());

        FlowControlExceptionUtils.handleException(
                CircuitBreakerException.createException(CircuitBreaker.ofDefaults(RULE_NAME)),
                flowControlResult);
        Assert.assertTrue(flowControlResult.getResponse().getMsg().contains("and does not permit further calls"));

        final CircuitBreakerRule circuitBreakerRule = new CircuitBreakerRule();
        circuitBreakerRule.setForceOpen(true);
        FlowControlExceptionUtils.handleException(
                CircuitBreakerException.createException(new CircuitBreakerAdaptor(CircuitBreaker.ofDefaults(RULE_NAME),
                        circuitBreakerRule)), flowControlResult);
        Assert.assertTrue(flowControlResult.getResponse().getMsg().contains("has forced open and deny any requests"));

        FlowControlExceptionUtils.handleException(
                new FaultException(CommonConst.INTERVAL_SERVER_ERROR, "aborted by fault", new FaultRule()),
                flowControlResult);
        Assert.assertEquals("aborted by fault", flowControlResult.getResponse().getMsg());

        FlowControlExceptionUtils.handleException(
                InstanceIsolationException.createException(CircuitBreaker.ofDefaults(RULE_NAME)),
                flowControlResult);
        Assert.assertTrue(flowControlResult.getResponse().getMsg().contains("and does not permit further calls"));

        final CircuitBreakerRule instanceRule = new CircuitBreakerRule();
        instanceRule.setForceOpen(true);
        FlowControlExceptionUtils.handleException(
                InstanceIsolationException.createException(new CircuitBreakerAdaptor(CircuitBreaker.ofDefaults(RULE_NAME),
                        instanceRule)), flowControlResult);
        Assert.assertTrue(flowControlResult.getResponse().getMsg().contains("has forced open and deny any requests"));
    }