@Test
public void testRecover() throws Exception {

    // test recover nothing
    abstractRegistry.recover();
    Assertions.assertFalse(abstractRegistry.getRegistered().contains(testUrl));
    Assertions.assertNull(abstractRegistry.getSubscribed().get(testUrl));
    // test recover
    abstractRegistry.register(testUrl);
    abstractRegistry.subscribe(testUrl, listener);
    abstractRegistry.recover();
    // check if recover successfully
    Assertions.assertTrue(abstractRegistry.getRegistered().contains(testUrl));
    Assertions.assertNotNull(abstractRegistry.getSubscribed().get(testUrl));
    Assertions.assertTrue(abstractRegistry.getSubscribed().get(testUrl).contains(listener));
}