RouteContext { public Map<String, Set<String>> getDataSourceLogicTablesMap(final Collection<String> actualDataSourceNames) { Map<String, Set<String>> result = new HashMap<>(actualDataSourceNames.size(), 1); for (String each : actualDataSourceNames) { Set<String> logicTableNames = getLogicTableNames(each); if (!logicTableNames.isEmpty()) { result.put(each, logicTableNames); } } return result; }  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 assertGetDataSourceLogicTablesMap() { List<String> dataSources = Lists.newArrayList(DATASOURCE_NAME_0, DATASOURCE_NAME_1); Map<String, Set<String>> actual = multiRouteContext.getDataSourceLogicTablesMap(dataSources); assertThat(actual.size(), is(2)); assertThat(actual.get(DATASOURCE_NAME_0).size(), is(1)); assertThat(actual.get(DATASOURCE_NAME_0).iterator().next(), is(LOGIC_TABLE)); assertThat(actual.get(DATASOURCE_NAME_1).size(), is(1)); assertThat(actual.get(DATASOURCE_NAME_1).iterator().next(), is(LOGIC_TABLE)); }