@Test(expected = IllegalStateException.class)
public void invalidAddCacheDuplicateName() {

    String cacheName = "cache1";
    Cache cache1 = Mockito.mock(Cache.class);
    Cache cache2 = Mockito.mock(Cache.class);
    Mockito.when(cache1.getName()).thenReturn(cacheName);
    Mockito.when(cache2.getName()).thenReturn(cacheName);
    cut.addCache(cache1);
    cut.addCache(cache2);
}