@Override
    public Iterable<LispRouter> getSubscribedRouters() {
        return connectedRouters.entrySet()
                .stream()
                .filter(e -> e.getValue().isSubscribed())
                .collect(toConcurrentMap(Map.Entry::getKey,
                                         Map.Entry::getValue)).values();
    }
@Test
    public void testAddRemoveSubscribedRouter() {
        router1.setSubscribed(true);
        router2.setSubscribed(true);

        // Test adding connected routers into agent
        boolean addRouter1 = agent.addConnectedRouter(routerId1, router1);
        assertThat(addRouter1, is(true));
        boolean addRouter2 = agent.addConnectedRouter(routerId2, router2);
        assertThat(addRouter2, is(true));

        assertThat(Lists.newArrayList(
                controller.getSubscribedRouters()), hasSize(2));
        assertThat(Lists.newArrayList(
                controller.getSubscribedRouters()), hasItems(router1, router2));
    }