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