use of com.fasterxml.jackson.databind.type.ClassKey in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class PageModuleProviderTest method testPageModule.
@Test
public void testPageModule() throws Exception {
PageModuleProvider pmp = new PageModuleProvider();
Module module = pmp.getModule();
assertTrue(module instanceof SimpleModule);
Field field = module.getClass().getDeclaredField("_serializers");
field.setAccessible(true);
SimpleSerializers simpleSerializers = (SimpleSerializers) field.get(module);
field = simpleSerializers.getClass().getDeclaredField("_interfaceMappings");
field.setAccessible(true);
HashMap<ClassKey, JsonSerializer<?>> classMappings = (HashMap) field.get(simpleSerializers);
assertTrue(classMappings.containsKey(new ClassKey(Page.class)));
}
Aggregations