class BindingConditions {

    public static <T> BindingCondition<T> isNamedIgnoringCase(Class<? extends T> type, final CharSequence value) {
        return new BindingCondition<T>() {
            
            @Override
            public boolean fulfilled(ClassInjector injector, Class<T> type, Map<String, Class<? extends T>[]> inheritanceTree, Annotation qualifier,
                    ClassLoader classLoader) {
                return qualifier instanceof Named && ((Named) qualifier).value().equalsIgnoreCase(value.toString());
            }
            
        };
    }

}

class BindingConditionsTest {

     ClassLoader classLoader;
     BindingCondition<Object> nonConfirming;
     BindingCondition<Object> confirming;

    @Test
    public void isNotNamedIgnoringCase() {

        assertFalse(BindingConditions.isNamedIgnoringCase(Tire.class, "spare").fulfilled(null, Tire.class, null, new Named() {
            
            @Override
            public Class<? extends Annotation> annotationType() {
                return Named.class;
            }
            
            @Override
            public String value() {
                return "notspare";
            }
            
        }, classLoader));
    }

}