@Override
    public RouteContext route(final RouteContext routeContext, final BroadcastRule broadcastRule) {
        Collection<String> logicTableNames = broadcastRule.getBroadcastRuleTableNames(broadcastRuleTableNames);
        if (logicTableNames.isEmpty()) {
            routeContext.getRouteUnits().addAll(getRouteContext(broadcastRule).getRouteUnits());
        } else {
            routeContext.getRouteUnits().addAll(getRouteContext(broadcastRule, logicTableNames).getRouteUnits());
        }
        return routeContext;
    }
@Test
    void assertRouteWithBroadcastRuleTable() {
        Collection<String> broadcastRuleTableNames = Collections.singleton("t_address");
        BroadcastTableBroadcastRoutingEngine engine = new BroadcastTableBroadcastRoutingEngine(broadcastRuleTableNames);
        BroadcastRule broadcastRule = mock(BroadcastRule.class);
        when(broadcastRule.getDataSourceNames()).thenReturn(Arrays.asList("ds_0", "ds_1"));
        when(broadcastRule.getBroadcastRuleTableNames(any())).thenReturn(Collections.singleton("t_address"));
        RouteContext routeContext = engine.route(new RouteContext(), broadcastRule);
        assertThat(routeContext.getRouteUnits().size(), is(2));
        Iterator<RouteUnit> iterator = routeContext.getRouteUnits().iterator();
        assertRouteMapper(iterator.next(), "ds_0", "t_address");
        assertRouteMapper(iterator.next(), "ds_1", "t_address");
    }