PrimaryReplicaReplicationDataSourceRule { public List<String> getReplicaDataSourceNames() { return replicaDataSourceNames.stream().filter(each -> !disabledDataSourceNames.contains(each)).collect(Collectors.toList()); } PrimaryReplicaReplicationDataSourceRule(final PrimaryReplicaReplicationDataSourceRuleConfiguration config, final ReplicaLoadBalanceAlgorithm loadBalancer); List<String> getReplicaDataSourceNames(); void updateDisabledDataSourceNames(final String dataSourceName, final boolean isDisabled); Map<String, Collection<String>> getDataSourceMapper();  }
@Test public void assertGetReplicaDataSourceNamesWithoutDisabledDataSourceNames() { assertThat(primaryReplicaDataSourceRule.getReplicaDataSourceNames(), is(Arrays.asList("replica_ds_0", "replica_ds_1"))); }