@Override
    public RouteContext route(final RouteContext routeContext, final BroadcastRule broadcastRule) {
        RouteContext result = new RouteContext();
        for (String each : broadcastRule.getDataSourceNames()) {
            if (resourceMetaData.getAllInstanceDataSourceNames().contains(each)) {
                result.getRouteUnits().add(new RouteUnit(new RouteMapper(each, each), Collections.emptyList()));
            }
        }
        return result;
    }
@Test
    void assertRoute() {
        ResourceMetaData resourceMetaData = mock(ResourceMetaData.class);
        when(resourceMetaData.getAllInstanceDataSourceNames()).thenReturn(Collections.singleton("ds_0"));
        BroadcastInstanceBroadcastRoutingEngine engine = new BroadcastInstanceBroadcastRoutingEngine(resourceMetaData);
        BroadcastRule broadcastRule = mock(BroadcastRule.class);
        when(broadcastRule.getDataSourceNames()).thenReturn(Arrays.asList("ds_0", "ds_1"));
        RouteContext routeContext = engine.route(new RouteContext(), broadcastRule);
        assertThat(routeContext.getRouteUnits().size(), is(1));
        assertDataSourceRouteMapper(routeContext.getRouteUnits().iterator().next(), "ds_0");
    }