@Test public void testModsDefinition() throws Exception { ObjectMapper om = new JacksonProvider().getContext(ModsWrapper.class); om.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); ModsDefinition mods = ModsStreamEditor.defaultMods("uuid:test"); String toJson = om.writeValueAsString(new ModsWrapper(mods)); ModsWrapper result = om.readValue(toJson, ModsWrapper.class); assertNotNull(result); ModsDefinition resultMods = result.getMods(); assertNotNull(resultMods); IdentifierDefinition resultPid = resultMods.getIdentifier().get(0); assertEquals("uuid", resultPid.getType()); assertEquals("test", resultPid.getValue()); }
@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);  }