EtcdRepository implements ConfigurationRepository, RegistryRepository { @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public void persist(final String key, final String value) { client.getKVClient().put(ByteSequence.from(key, Charsets.UTF_8), ByteSequence.from(value, Charsets.UTF_8)).get(); }  @Override void init(final String name, final GovernanceCenterConfiguration config); @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override String get(final String key); @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override List<String> getChildrenKeys(final String key); @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override void persist(final String key, final String value); @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override void persistEphemeral(final String key, final String value); @Override void delete(final String key); @Override void watch(final String key, final DataChangedEventListener dataChangedEventListener); @Override void close(); @Override String getType();  }
@Test public void assertPersist() { repository.persist("key1", "value1"); verify(kv).put(any(ByteSequence.class), any(ByteSequence.class)); }