@Test
void testUnserializeMapInMapWithTypeWithGenerics() throws Exception
{

    Type annotatedType = new DefaultParameterizedType(null, ComponentRole.class, String.class);
    Type mapType1 = new DefaultParameterizedType(null, Map.class, String.class, annotatedType);
    Type mapType2 = new DefaultParameterizedType(null, Map.class, String.class, mapType1);
    assertEquals(mapType2,
        ReflectionUtils.unserializeType(
            "java.util.Map<java.lang.String, java.util.Map<java.lang.String, "
                + "org.xwiki.component.descriptor.ComponentRole<java.lang.String>>>",
            Thread.currentThread().getContextClassLoader()));
}