### Question:
SimpleStoreImpl implements SimpleStore { @Override public ListenableFuture<Void> clear() { requireOpen(); return Futures.submitAsync( () -> { Exception isDead = isDead(); if (isDead != null) { return Futures.immediateFailedFuture(isDead); } try { File[] files = Objects.requireNonNull(namespacedDirectory).listFiles(File::isFile); if (files != null && files.length > 0) { for (File f : files) { f.delete(); } } namespacedDirectory.delete(); cache.clear(); } catch (Exception e) { return Futures.immediateFailedFuture(e); } return Futures.immediateFuture(null); }, orderedIoExecutor); } SimpleStoreImpl(DirectoryProvider directoryProvider, String namespace, NamespaceConfig config); @Override ListenableFuture<String> getString(String key); @Override ListenableFuture<String> putString(String key, @Nullable String value); @Override ListenableFuture<byte[]> get(String key); @Override ListenableFuture<byte[]> put(String key, @Nullable byte[] value); @Override ListenableFuture<Boolean> contains(String key); @Override ListenableFuture<Void> remove(String key); @Override ListenableFuture<Void> clear(); @Override ListenableFuture<Void> deleteAllNow(); @Override void close();  }### Answer:
@Test public void clear() throws Exception { try (SimpleStore store = SimpleStoreFactory.create(directoryProvider, SAMPLE_SCOPE)) { store.put(TEST_KEY, new byte[1]).get(); store.clear().get(); ListenableFuture<byte[]> empty = store.get(TEST_KEY); assertThat(empty.get()).isEmpty(); } }