### Question:
SimpleStoreImpl implements SimpleStore { @Override public ListenableFuture<String> putString(String key, @Nullable String value) { byte[] bytes; if (value == null || value.isEmpty()) { bytes = null; } else { bytes = value.getBytes(STRING_ENCODING); } return Futures.transform(put(key, bytes), (b) -> value, MoreExecutors.directExecutor()); } 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 putString() throws Exception { try (SimpleStore store = SimpleStoreFactory.create(directoryProvider, SAMPLE_SCOPE)) { store.putString(TEST_KEY, "foo").get(); assertThat(store.getString(TEST_KEY).get()).isEqualTo("foo"); assertThat(store.contains(TEST_KEY).get()).isTrue(); store.putString(TEST_KEY, "").get(); assertThat(store.contains(TEST_KEY).get()).isFalse(); assertThat(store.getString(TEST_KEY).get()).isEqualTo(""); store.putString(TEST_KEY, null).get(); assertThat(store.contains(TEST_KEY).get()).isFalse(); assertThat(store.getString(TEST_KEY).get()).isEqualTo(""); } }