JoinFacesAnnotationProvider extends AnnotationProviderWrapper { @Override public Map<Class<? extends Annotation>, Set<Class<?>>> getAnnotatedClasses(ExternalContext ctx) { if (annotatedClasses != null) { return annotatedClasses; } else { return super.getAnnotatedClasses(ctx); } } JoinFacesAnnotationProvider(AnnotationProvider delegate); @Override Map<Class<? extends Annotation>, Set<Class<?>>> getAnnotatedClasses(ExternalContext ctx);  }
@Test @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT") public void getAnnotatedClasses_notSet() { AnnotationProvider annotationProvider = mock(AnnotationProvider.class); JoinFacesAnnotationProvider joinFacesAnnotationProvider = new JoinFacesAnnotationProvider(annotationProvider); joinFacesAnnotationProvider.getAnnotatedClasses(mock(ExternalContext.class)); verify(annotationProvider).getAnnotatedClasses(any()); }