BindingConditions { @SuppressWarnings("unchecked") public static <T> BindingCondition<T> annotationIsPresent(Class<? extends T> type, Class<? extends Annotation> annotation) { return anyAnnotationIsPresent(type, annotation); }  @SuppressWarnings("unchecked") static BindingCondition<T> annotationIsPresent(Class<? extends T> type, Class<? extends Annotation> annotation); static BindingCondition<T> qualifierIs(Class<? extends T> type, final Class<? extends Annotation> expectedQualifier); static BindingCondition<T> isNamed(Class<? extends T> type, final CharSequence value); static BindingCondition<T> isNamedIgnoringCase(Class<? extends T> type, final CharSequence value); static BindingCondition<T> allAnnotationsArePresent(Class<? extends T> type, final Class<? extends Annotation>... annotations); static BindingCondition<T> anyAnnotationIsPresent(Class<? extends T> type, final Class<? extends Annotation>... annotations); static BindingCondition<T> and(final BindingCondition<T>... conditions); static BindingCondition<T> or(final BindingCondition<T>... conditions); static BindingCondition<T> xor(final BindingCondition<T> condition1, final BindingCondition<T> condition2);  }
@Test public void annotationIsPresent() { assertTrue(BindingConditions.annotationIsPresent(Seat.class, Singleton.class).fulfilled(null, Seat.class, null, new Singleton() { @Override public Class<? extends Annotation> annotationType() { return Singleton.class; } }, classLoader)); }
@Test public void annotationNotPresent() { assertFalse(BindingConditions.annotationIsPresent(Seat.class, Inject.class).fulfilled(null, Seat.class, null, null, classLoader)); }