@Test
public void filterEmptyTest() throws Exception {

    // check parameters
    try {
        AbstractRegistry.filterEmpty(null, null);
        Assertions.fail();
    } catch (Exception e) {
        Assertions.assertTrue(e instanceof NullPointerException);
    }
    // check parameters
    List<URL> urls = new ArrayList<>();
    try {
        AbstractRegistry.filterEmpty(null, urls);
        Assertions.fail();
    } catch (Exception e) {
        Assertions.assertTrue(e instanceof NullPointerException);
    }
    // check if the output is generated by a fixed way
    urls.add(testUrl.setProtocol(EMPTY_PROTOCOL));
    Assertions.assertEquals(AbstractRegistry.filterEmpty(testUrl, null), urls);
    List<URL> testUrls = new ArrayList<>();
    Assertions.assertEquals(AbstractRegistry.filterEmpty(testUrl, testUrls), urls);
    // check if the output equals the input urls
    testUrls.add(testUrl);
    Assertions.assertEquals(AbstractRegistry.filterEmpty(testUrl, testUrls), testUrls);
}