@Test
public void testUpdateCache() throws Exception {

    final Method method = AnnotationTest.class.getMethod("cacheMe01", List.class);
    final UpdateMultiCache annotation = method.getAnnotation(UpdateMultiCache.class);
    final AnnotationData data = AnnotationDataBuilder.buildAnnotationData(annotation, UpdateMultiCache.class, method);
    final List<String> keys = new ArrayList<String>();
    final List<Object> objs = new ArrayList<Object>();
    keys.add("Key1-" + System.currentTimeMillis());
    keys.add("Key2-" + System.currentTimeMillis());
    try {
        cut.updateCache(keys, objs, method, data, null);
        fail("Expected Exception.");
    } catch (InvalidAnnotationException ex) {
        assertTrue(ex.getMessage().contains("do not match in size"));
    }
    final Cache cache = EasyMock.createMock(Cache.class);
    EasyMock.expect(cache.getName()).andReturn(AnnotationConstants.DEFAULT_CACHE_NAME);
    EasyMock.expect(cache.getAliases()).andReturn(Collections.<String> emptyList()).anyTimes();
    EasyMock.expect(cache.getProperties()).andReturn(new CacheProperties()).anyTimes();
    for (final String key : keys) {
        final String value = "ValueFor-" + key;
        objs.add(value);
        cache.setSilently(key, data.getExpiration(), value, null);
        EasyMock.expectLastCall();
    }
    keys.add("BigFatNull");
    objs.add(null);
    cache.setSilently(keys.get(2), data.getExpiration(), new PertinentNegativeNull(), null);
    EasyMock.expectLastCall();
    EasyMock.replay(cache);
    cut.getCacheBase().addCache(cache);
    cut.updateCache(keys, objs, method, data, null);
    EasyMock.verify(cache);
}