@Test
void unserializeMapTypeWithGenerics() throws Exception
{

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