public LispRouter getRouterInstance(IpAddress ipAddress) {
        LispRouterId routerId = new LispRouterId(ipAddress);
        if (!routerMap.containsKey(routerId)) {
            LispRouter router = new DefaultLispRouter(routerId);
            router.setAgent(agent);
            routerMap.put(routerId, router);
            return router;
        } else {
            return routerMap.get(routerId);
        }
    }
@Test
    public void testGetRouterInstance() throws Exception {
        IpAddress ipAddress = IpAddress.valueOf("192.168.1.1");

        LispRouter router1 = routerFactory.getRouterInstance(ipAddress);
        LispRouter router2 = routerFactory.getRouterInstance(ipAddress);

        assertThat(router1, is(router2));
    }