### Question:
LocalKeyValueStoreService implements KeyValueStoreService<T> { @Override public void putWithConfirmation(final Callback<Boolean> confirmation, final String key, final T value) { cache.put(key, cacheEntry(key, value)); final CallbackBuilder callbackBuilder = reactor.callbackBuilder(); if (debug) { callbackBuilder.wrapWithLogging(confirmation, logger, String.format("put with confirmation %s", key)); } else { callbackBuilder.wrapWithLogging(confirmation, logger, "put with confirmation"); } writeBehindWriter.writeWithConfirmation(callbackBuilder.build(), key, value); } LocalKeyValueStoreService(
            final Reactor reactor,
            final Timer timer,
            final FallbackReader<T> fallbackReader,
            final WriteBehindWriter<T> writeBehindWriter,
            final int cacheSize,
            final Duration flushEvery,
            final StatsCollector statsCollector,
            final String statKey,
            final Duration debugInterval,
            final boolean debug); @Override void put(final String key,
                    final T value); @Override void putWithConfirmation(final Callback<Boolean> confirmation,
                                    final String key,
                                    final T value); @Override void putWithConfirmationAndTimeout(final Callback<Boolean> confirmation,
                                              final String key,
                                              final T value,
                                              final Duration expiry); @Override void putWithTimeout(final String key,
                               final T value,
                               final Duration expiry); @Override void get(final Callback<Optional<T>> callback,
                    final String key); @Override void hasKey(final Callback<Boolean> hasKeyCallback, final String key); @Override void delete(final String key); @Override void deleteWithConfirmation(Callback<Boolean> confirmation, String key); @Override void wipeCache(); @QueueCallback({QueueCallbackType.EMPTY, QueueCallbackType.LIMIT, QueueCallbackType.IDLE}) void process();  }### Answer:
@Test public void testAllDebug() throws InterruptedException { setupWithDebug(); test(); setupWithDebug(); this.putWithConfirmation(); setupWithDebug(); this.testDelete(); setupWithDebug(); this.testDeleteWithConfirmation(); }
@Test public void putWithConfirmation() throws InterruptedException { CountDownLatch latch = new CountDownLatch(1); AtomicBoolean putConfirmation = new AtomicBoolean(); kvStore.putWithConfirmation(confirmed -> { putConfirmation.set(confirmed); latch.countDown(); }, "testKey", new Todo("testValue")); ServiceProxyUtils.flushServiceProxy(kvStore); latch.await(1, TimeUnit.SECONDS); final Optional<Todo> todoOptional = getTodoForKey("testKey"); assertTrue(todoOptional.isPresent()); assertEquals("testValue", todoOptional.get().name); final Optional<String> todoForKeyFromBacking = getTodoForKeyFromBacking("testKey"); assertTrue(todoForKeyFromBacking.isPresent()); assertEquals("{\"name\":\"testValue\"}", todoForKeyFromBacking.get()); }