PageModuleProvider implements ModuleProvider { @Override public Module getModule() { return module; } PageModuleProvider(); @Override Module getModule();  }
@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))); }