class CacheBase implements ApplicationContextAware, InitializingBean {

    protected void verifyReturnTypeIsList(final Method method, final Class<?> annotationClass) {
        if (!verifyTypeIsList(method.getReturnType())) {
            throw new InvalidAnnotationException(
                    String.format("The annotation [%s] is only valid on a method that returns a [%s] or its subclass. "
                            + "[%s] does not fulfill this requirement.", annotationClass.getName(), List.class.getName(), method.toString()));
        }
    }

}