@Test public void testNomenclatureAsValueMap() throws Exception { Nomenclatures n = new Nomenclatures(); n.setRecCls(new RecCls()); List<RecCl> recCls = n.getRecCls().getRecCl(); RecCl recCl = new RecCl(); recCl.setFullyQcc("FullyQcc"); recCls.add(recCl); DesaServices desaServices = new DesaServices(null); List<ValueMap> valueMap = desaServices.getValueMap(n, "test"); SmartGwtResponse<ValueMap> sgr = new SmartGwtResponse<ValueMap>(valueMap); ObjectMapper om = new JacksonProvider().getContext(SmartGwtResponse.class); om.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); String toJson = om.writeValueAsString(sgr); assertTrue(toJson.contains("\"data\":[{\"mapId\":\"test.rec-cl\",\"values\":[{\"fullyQcc\":\"FullyQcc\"}]}]}")); }
@Override public ObjectMapper getContext(Class<?> type) { return mapper; }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } JacksonProvider(); }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } JacksonProvider(); @Override ObjectMapper getContext(Class<?> type); }
JacksonProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return mapper; } JacksonProvider(); @Override ObjectMapper getContext(Class<?> type);  }