PrimaryReplicaReplicationRule implements DataSourceRoutedRule, StatusContainedRule { public PrimaryReplicaReplicationDataSourceRule getSingleDataSourceRule() { return dataSourceRules.values().iterator().next(); } PrimaryReplicaReplicationRule(final PrimaryReplicaReplicationRuleConfiguration config);  PrimaryReplicaReplicationRule(final AlgorithmProvidedPrimaryReplicaReplicationRuleConfiguration config); PrimaryReplicaReplicationDataSourceRule getSingleDataSourceRule(); Optional<PrimaryReplicaReplicationDataSourceRule> findDataSourceRule(final String dataSourceName); @Override Map<String, Collection<String>> getDataSourceMapper(); @Override void updateRuleStatus(final RuleChangedEvent event);  }
@Test public void assertGetSingleDataSourceRule() { assertDataSourceRule(createPrimaryReplicaReplicationRule().getSingleDataSourceRule()); }