@Test
@SuppressWarnings("unchecked")
public void deepCopy() throws Exception {

    Map<String, Object> result = readInput();
    Map<String, Map<String, Object>> cache = (Map<String, Map<String, Object>>) result.get("cache");
    for (String key : cache.keySet()) {
        Map<String, Object> original = cache.get(key);
        Map<String, Object> copy = RBACDecorator.deepCopy(original);
        assertThat(copy, not(sameInstance(original)));
        assertThat(copy, equalTo(original));
    }
}