test_class.declarator: CENTER_TYPE = "etcd"
test_class.modifier: private static final
test_class.original_string: private static final String CENTER_TYPE = "etcd";
test_class.type: String
test_class.var_name: CENTER_TYPE
test_class.declarator: client
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Client client;
test_class.type: Client
test_class.var_name: client
test_class.declarator: kv
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private KV kv;
test_class.type: KV
test_class.var_name: kv
test_class.declarator: watch
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Watch watch;
test_class.type: Watch
test_class.var_name: watch
test_class.declarator: lease
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Lease lease;
test_class.type: Lease
test_class.var_name: lease
test_class.declarator: getFuture
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CompletableFuture getFuture;
test_class.type: CompletableFuture
test_class.var_name: getFuture
test_class.declarator: leaseFuture
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CompletableFuture leaseFuture;
test_class.type: CompletableFuture
test_class.var_name: leaseFuture
test_class.declarator: leaseGrantResponse
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private LeaseGrantResponse leaseGrantResponse;
test_class.type: LeaseGrantResponse
test_class.var_name: leaseGrantResponse
test_class.declarator: getResponse
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GetResponse getResponse;
test_class.type: GetResponse
test_class.var_name: getResponse
test_class.declarator: putFuture
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private CompletableFuture putFuture;
test_class.type: CompletableFuture
test_class.var_name: putFuture
test_class.declarator: repository = new EtcdRepository()
test_class.modifier: private final
test_class.original_string: private final EtcdRepository repository = new EtcdRepository();
test_class.type: EtcdRepository
test_class.var_name: repository
test_class.file: shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepositoryTest.java
test_class.identifier: EtcdRepositoryTest
test_case.body: @Test
      public void assertGetChildrenKeys() {
          io.etcd.jetcd.api.KeyValue keyValue1 = io.etcd.jetcd.api.KeyValue.newBuilder()
              .setKey(ByteString.copyFromUtf8("/key/key1/key1-1"))
              .setValue(ByteString.copyFromUtf8("value1")).build();
          io.etcd.jetcd.api.KeyValue keyValue2 = io.etcd.jetcd.api.KeyValue.newBuilder()
              .setKey(ByteString.copyFromUtf8("/key/key2"))
              .setValue(ByteString.copyFromUtf8("value3")).build();
          List<KeyValue> keyValues = Arrays.asList(new KeyValue(keyValue1, ByteSequence.EMPTY), new KeyValue(keyValue2, ByteSequence.EMPTY), 
                  new KeyValue(keyValue1, ByteSequence.EMPTY));
          when(getResponse.getKvs()).thenReturn(keyValues);
          List<String> actual = repository.getChildrenKeys("/key");
          assertThat(actual.size(), is(2));
          Iterator<String> iterator = actual.iterator();
          assertThat(iterator.next(), is("key1"));
          assertThat(iterator.next(), is("key2"));
      }
test_case.class_method_signature: EtcdRepositoryTest.assertGetChildrenKeys()
test_case.full_signature: @Test public void assertGetChildrenKeys()
test_case.identifier: assertGetChildrenKeys
test_case.invocations: build setValue setKey newBuilder copyFromUtf8 copyFromUtf8 build setValue setKey newBuilder copyFromUtf8 copyFromUtf8 asList thenReturn when getKvs getChildrenKeys assertThat size is iterator assertThat next is assertThat next is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertGetChildrenKeys()
focal_class.declarator: client
focal_class.modifier: private
focal_class.original_string: private Client client;
focal_class.type: Client
focal_class.var_name: client
focal_class.declarator: props = new Properties()
focal_class.modifier: @Getter
      @Setter
      private
focal_class.original_string: @Getter
      @Setter
      private Properties props = new Properties();
focal_class.type: Properties
focal_class.var_name: props
focal_class.declarator: etcdProperties
focal_class.modifier: private
focal_class.original_string: private EtcdProperties etcdProperties;
focal_class.type: EtcdProperties
focal_class.var_name: etcdProperties
focal_class.file: shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
focal_class.identifier: EtcdRepository
focal_class.interfaces: implements ConfigurationRepository, RegistryRepository
focal_class.class_method_signature: EtcdRepository.init(final String name, final GovernanceCenterConfiguration config)
focal_class.full_signature: @Override public void init(final String name, final GovernanceCenterConfiguration config)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, final GovernanceCenterConfiguration config)
focal_class.return: void
focal_class.signature: void init(final String name, final GovernanceCenterConfiguration config)
focal_class.class_method_signature: EtcdRepository.get(final String key)
focal_class.full_signature: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public String get(final String key)
focal_class.identifier: get
focal_class.modifiers: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public
focal_class.parameters: (final String key)
focal_class.return: String
focal_class.signature: String get(final String key)
focal_class.class_method_signature: EtcdRepository.getChildrenKeys(final String key)
focal_class.full_signature: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public List<String> getChildrenKeys(final String key)
focal_class.identifier: getChildrenKeys
focal_class.modifiers: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public
focal_class.parameters: (final String key)
focal_class.return: List<String>
focal_class.signature: List<String> getChildrenKeys(final String key)
focal_class.class_method_signature: EtcdRepository.getSubNodeKeyName(final String prefix, final String fullPath)
focal_class.full_signature: private String getSubNodeKeyName(final String prefix, final String fullPath)
focal_class.identifier: getSubNodeKeyName
focal_class.modifiers: private
focal_class.parameters: (final String prefix, final String fullPath)
focal_class.return: String
focal_class.signature: String getSubNodeKeyName(final String prefix, final String fullPath)
focal_class.class_method_signature: EtcdRepository.persist(final String key, final String value)
focal_class.full_signature: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public void persist(final String key, final String value)
focal_class.identifier: persist
focal_class.modifiers: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public
focal_class.parameters: (final String key, final String value)
focal_class.return: void
focal_class.signature: void persist(final String key, final String value)
focal_class.class_method_signature: EtcdRepository.persistEphemeral(final String key, final String value)
focal_class.full_signature: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public void persistEphemeral(final String key, final String value)
focal_class.identifier: persistEphemeral
focal_class.modifiers: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public
focal_class.parameters: (final String key, final String value)
focal_class.return: void
focal_class.signature: void persistEphemeral(final String key, final String value)
focal_class.class_method_signature: EtcdRepository.delete(final String key)
focal_class.full_signature: @Override public void delete(final String key)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (final String key)
focal_class.return: void
focal_class.signature: void delete(final String key)
focal_class.class_method_signature: EtcdRepository.watch(final String key, final DataChangedEventListener dataChangedEventListener)
focal_class.full_signature: @Override public void watch(final String key, final DataChangedEventListener dataChangedEventListener)
focal_class.identifier: watch
focal_class.modifiers: @Override public
focal_class.parameters: (final String key, final DataChangedEventListener dataChangedEventListener)
focal_class.return: void
focal_class.signature: void watch(final String key, final DataChangedEventListener dataChangedEventListener)
focal_class.class_method_signature: EtcdRepository.getEventChangedType(final WatchEvent event)
focal_class.full_signature: private ChangedType getEventChangedType(final WatchEvent event)
focal_class.identifier: getEventChangedType
focal_class.modifiers: private
focal_class.parameters: (final WatchEvent event)
focal_class.return: ChangedType
focal_class.signature: ChangedType getEventChangedType(final WatchEvent event)
focal_class.class_method_signature: EtcdRepository.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: EtcdRepository.getType()
focal_class.full_signature: @Override public String getType()
focal_class.identifier: getType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getType()
focal_method.body: @SneakyThrows({InterruptedException.class, ExecutionException.class})
      @Override
      public List<String> getChildrenKeys(final String key) {
          String prefix = key + PATH_SEPARATOR;
          ByteSequence prefixByteSequence = ByteSequence.from(prefix, Charsets.UTF_8);
          GetOption getOption = GetOption.newBuilder().withPrefix(prefixByteSequence).withSortField(GetOption.SortTarget.KEY).withSortOrder(GetOption.SortOrder.ASCEND).build();
          List<KeyValue> keyValues = client.getKVClient().get(prefixByteSequence, getOption).get().getKvs();
          return keyValues.stream().map(e -> getSubNodeKeyName(prefix, e.getKey().toString(Charsets.UTF_8))).distinct().collect(Collectors.toList());
      }
focal_method.class_method_signature: EtcdRepository.getChildrenKeys(final String key)
focal_method.full_signature: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public List<String> getChildrenKeys(final String key)
focal_method.identifier: getChildrenKeys
focal_method.invocations: from build withSortOrder withSortField withPrefix newBuilder getKvs get get getKVClient collect distinct map stream getSubNodeKeyName toString getKey toList
focal_method.modifiers: @SneakyThrows({InterruptedException.class, ExecutionException.class}) @Override public
focal_method.parameters: (final String key)
focal_method.return: List<String>
focal_method.signature: List<String> getChildrenKeys(final String key)