public Protocol forName(final String identifier) {
        return this.forName(identifier, null);
    }
@Test
    public void testPrioritizeNonDeprecatedWithTypeLookup() {
        final TestProtocol first = new TestProtocol(Scheme.http) {
            @Override
            public Type getType() {
                return Type.dracoon;
            }

            @Override
            public String getProvider() {
                return "test-provider1";
            }

            @Override
            public boolean isBundled() {
                return false;
            }

            @Override
            public boolean isDeprecated() {
                return true;
            }
        };
        final TestProtocol second = new TestProtocol(Scheme.http) {
            @Override
            public Type getType() {
                return Type.dracoon;
            }

            @Override
            public String getProvider() {
                return "test-provider2";
            }

            @Override
            public boolean isBundled() {
                return false;
            }
        };
        final ProtocolFactory f = new ProtocolFactory(new LinkedHashSet<>(Arrays.asList(first, second)));
        assertEquals(second, f.forName("test", "test-provider2"));
        assertEquals(first, f.forName("test", "test-provider1"));
        assertEquals(second, f.forName("dracoon"));
    }