@Test
public void testReturnTypeChecking() throws Exception {

    Method method = null;
    method = ReturnTypeCheck.class.getMethod("checkA", (Class<?>[]) null);
    cut.verifyReturnTypeIsList(method, CacheKeyMethod.class);
    method = ReturnTypeCheck.class.getMethod("checkB", (Class<?>[]) null);
    cut.verifyReturnTypeIsList(method, CacheKeyMethod.class);
    method = ReturnTypeCheck.class.getMethod("checkC", (Class<?>[]) null);
    cut.verifyReturnTypeIsList(method, CacheKeyMethod.class);
    method = ReturnTypeCheck.class.getMethod("checkD", (Class<?>[]) null);
    cut.verifyReturnTypeIsList(method, CacheKeyMethod.class);
    try {
        method = ReturnTypeCheck.class.getMethod("checkE", (Class<?>[]) null);
        cut.verifyReturnTypeIsList(method, CacheKeyMethod.class);
        fail("Expected Exception.");
    } catch (InvalidAnnotationException ex) {
        assertTrue(ex.getMessage().indexOf("requirement") != -1);
    }
}