@Test
public void testOpenCircuit(TestContext context){

    Async async = context.async();
    QueueCircuitBreaker circuitBreaker = Mockito.spy(new ConfigurableQueueCircuitBreaker(QueueCircuitState.OPEN, true, true));
    new QueueProcessor(vertx, httpClient, monitoringHandler, circuitBreaker);
    vertx.eventBus().send(Address.queueProcessorAddress(), buildQueueEventBusMessage("my_queue"), event -> {
        context.assertTrue(event.succeeded());
        JsonObject result = (JsonObject) event.result().body();
        context.assertEquals("error", result.getString("status"));
        context.assertTrue(result.getString("message").contains("Circuit for queue my_queue is OPEN"));
        // open circuits should not result in actual http requests going out
        verify(httpClient, never()).request(any(HttpMethod.class), anyString(), Matchers.<Handler<HttpClientResponse>>any());
        verify(circuitBreaker, times(1)).isCircuitCheckEnabled();
        verify(circuitBreaker, times(1)).handleQueuedRequest(anyString(), any(HttpRequest.class));
        async.complete();
    });
}