@Test
public void testQueueLockFailingStorage(TestContext context){

    Async async = context.async();
    HttpRequest req = new HttpRequest(HttpMethod.PUT, "/playground/circuitBreaker/test", MultiMap.caseInsensitiveMultiMap(), null);
    Mockito.when(ruleToCircuitMapping.getCircuitFromRequestUri(anyString()))
            .thenReturn(new PatternAndCircuitHash(Pattern.compile("/someCircuit"), "someCircuitHash"));
    Mockito.when(queueCircuitBreakerStorage.lockQueue(anyString(), any(PatternAndCircuitHash.class)))
            .thenReturn(Future.failedFuture("queue could not be locked"));
    vertx.eventBus().consumer(Address.redisquesAddress(), (Message<JsonObject> event) -> {
        context.fail("Redisques should not have been called when the storage failed");
    });
    queueCircuitBreaker.lockQueue("someQueue", req).setHandler(event -> {
        context.assertTrue(event.failed());
        context.assertTrue(event.cause().getMessage().contains("queue could not be locked"));
        verify(queueCircuitBreakerStorage, times(1)).lockQueue(anyString(), any(PatternAndCircuitHash.class));
        async.complete();
    });
    async.awaitSuccess();
}