### Question:
InvalidateMultiCacheAdvice extends CacheBase { protected List<Object> convertToKeyObjects(final Object keyObject, final int keyIndex, final String methodDescription) throws Exception { if (verifyTypeIsList(keyObject.getClass())) { return (List<Object>) keyObject; } throw new InvalidAnnotationException(String.format( "The parameter object found at dataIndex [%s] is not a [%s]. " + "[%s] does not fulfill the requirements.", keyIndex, List.class.getName(), methodDescription )); }  @Pointcut("@annotation(net.nelz.simplesm.api.InvalidateMultiCache)") void invalidateMulti(); @Around("invalidateMulti()") Object cacheInvalidateMulti(final ProceedingJoinPoint pjp);  }### Answer:
@Test public void testConvertToKeyObjects() throws Exception { cut.convertToKeyObjects(new ArrayList<String>(), 2, "randomMethodName"); try { cut.convertToKeyObjects("Not A List", 2, "randomMethodName"); fail("Expected Exception."); } catch (InvalidAnnotationException ex) { assertTrue(ex.getMessage().contains("does not fulfill")); } }