### Question:
EhcacheObjectMapperProvider implements ContextResolver<ObjectMapper> { public ObjectMapper getContext(Class<?> arg0) { return om; } EhcacheObjectMapperProvider(); ObjectMapper getContext(Class<?> arg0);  }### Answer:
@Test public void testObjectMapping() throws IOException { EhcacheObjectMapperProvider provider = new EhcacheObjectMapperProvider(); ObjectMapper om = provider.getContext(AgentEntity.class); String output = om.writer().writeValueAsString(new AgentEntity()); Assert.assertEquals("{\"agentId\":null,\"cacheManagers\":null}", output); }