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

    Cache cache1 = Mockito.mock(Cache.class);
    Cache cache2 = Mockito.mock(Cache.class);
    Mockito.when(cache1.getName()).thenReturn("cache1");
    Mockito.when(cache2.getName()).thenReturn("cache2");
    Mockito.when(cache2.getAliases()).thenReturn(Arrays.asList("cache1"));
    cut.addCache(cache1);
    cut.addCache(cache2);
}