public Protocol forNameOrDefault(final String identifier) {
        return forNameOrDefault(identifier, null);
    }
@Test
    public void testForNameOrDefault() throws Exception {
        final TestProtocol ftp = new TestProtocol(Scheme.ftp);
        final TestProtocol dav = new TestProtocol(Scheme.dav);
        final ProtocolFactory f = new ProtocolFactory(new LinkedHashSet<>(Arrays.asList(ftp, dav)));
        assertEquals(dav, f.forNameOrDefault("dav"));
        assertEquals(ftp, f.forNameOrDefault("invalid"));
        assertEquals(ftp, f.forNameOrDefault("ftp"));
    }