@Test
public void testGetAllCircuits(TestContext context){

    Async async = context.async();
    String hash1 = "hash_1";
    String hash2 = "hash_2";
    String hash3 = "hash_3";
    context.assertFalse(jedis.exists(infosKey(hash1)));
    context.assertFalse(jedis.exists(infosKey(hash2)));
    context.assertFalse(jedis.exists(infosKey(hash3)));
    // prepare
    writeQueueCircuit(hash1, HALF_OPEN, "/path/to/hash_1", 60);
    writeQueueCircuit(hash2, CLOSED, "/path/to/hash_2", 20);
    writeQueueCircuit(hash3, OPEN, "/path/to/hash_3", 99);
    context.assertTrue(jedis.exists(infosKey(hash1)));
    context.assertTrue(jedis.exists(infosKey(hash2)));
    context.assertTrue(jedis.exists(infosKey(hash3)));
    context.assertEquals(3L, jedis.scard(STORAGE_ALL_CIRCUITS));
    context.assertEquals(HALF_OPEN.name().toLowerCase(), jedis.hget(infosKey(hash1), FIELD_STATE).toLowerCase());
    context.assertEquals("/path/to/hash_1", jedis.hget(infosKey(hash1), FIELD_CIRCUIT));
    context.assertEquals("60", jedis.hget(infosKey(hash1), FIELD_FAILRATIO));
    context.assertEquals(CLOSED.name().toLowerCase(), jedis.hget(infosKey(hash2), FIELD_STATE).toLowerCase());
    context.assertEquals("/path/to/hash_2", jedis.hget(infosKey(hash2), FIELD_CIRCUIT));
    context.assertEquals("20", jedis.hget(infosKey(hash2), FIELD_FAILRATIO));
    context.assertEquals(OPEN.name().toLowerCase(), jedis.hget(infosKey(hash3), FIELD_STATE).toLowerCase());
    context.assertEquals("/path/to/hash_3", jedis.hget(infosKey(hash3), FIELD_CIRCUIT));
    context.assertEquals("99", jedis.hget(infosKey(hash3), FIELD_FAILRATIO));
    storage.getAllCircuits().setHandler(event -> {
        context.assertTrue(event.succeeded());
        JsonObject result = event.result();
        assertJsonObjectContents(context, result, hash1, HALF_OPEN, "/path/to/hash_1", 60);
        assertJsonObjectContents(context, result, hash2, CLOSED, "/path/to/hash_2", 20);
        assertJsonObjectContents(context, result, hash3, OPEN, "/path/to/hash_3", 99);
        async.complete();
    });
}