RouteContext { public Collection<String> getActualDataSourceNames() { return routeUnits.stream().map(each -> each.getDataSourceMapper().getActualName()).collect(Collectors.toCollection(() -> new HashSet<>(routeUnits.size(), 1))); }  boolean isSingleRouting(); Collection<String> getActualDataSourceNames(); List<Set<String>> getActualTableNameGroups(final String actualDataSourceName, final Set<String> logicTableNames); Map<String, Set<String>> getDataSourceLogicTablesMap(final Collection<String> actualDataSourceNames); Optional<RouteMapper> findTableMapper(final String logicDataSourceName, final String actualTableName);  }
@Test public void assertGetActualDataSourceNames() { Collection<String> actual = singleRouteContext.getActualDataSourceNames(); assertThat(actual.size(), is(1)); assertThat(actual.iterator().next(), is(DATASOURCE_NAME_0)); actual = multiRouteContext.getActualDataSourceNames(); assertThat(actual.size(), is(2)); Iterator<String> iterator = actual.iterator(); assertThat(iterator.next(), is(DATASOURCE_NAME_0)); assertThat(iterator.next(), is(DATASOURCE_NAME_1)); }