@Test
public void destroyTest() throws Exception {

    abstractRegistry.register(testUrl);
    abstractRegistry.subscribe(testUrl, listener);
    Assertions.assertEquals(1, abstractRegistry.getRegistered().size());
    Assertions.assertEquals(1, abstractRegistry.getSubscribed().get(testUrl).size());
    // delete listener and register
    abstractRegistry.destroy();
    Assertions.assertEquals(0, abstractRegistry.getRegistered().size());
    Assertions.assertEquals(0, abstractRegistry.getSubscribed().get(testUrl).size());
}