DelegatingUnmarshalContext implements UnmarshalContext { public static DelegatingUnmarshalContext create(UnmarshalSource unmarshalSource, ClassLoader classLoader) { Objects.requireNonNull(unmarshalSource); Objects.requireNonNull(classLoader); return new DelegatingUnmarshalContext(unmarshalSource, classLoader); } private  DelegatingUnmarshalContext(UnmarshalSource unmarshalSource, ClassLoader classLoader); static DelegatingUnmarshalContext create(UnmarshalSource unmarshalSource, ClassLoader classLoader); static Object unmarshal(UnmarshalSource unmarshalSource, ClassLoader classLoader); @Override ClassLoader getClassLoader(); @Override ByteSequence getByteSequence(Key key); @Override Object readObject(Key key); Object process();  }
@Test public void create() throws IOException { ObjectNode tree = MarshaledReplacementObjectNode.of(INTEGER_MARSHALER, RawObjectNode.of(STRING_MARSHALER, "42")); UnmarshalContext unmarshalContext = DelegatingUnmarshalContext.create( MarshalingTreeUnmarshalSource.create(tree), getClass().getClassLoader() ); Assert.assertEquals(INTEGER_MARSHALER.get(unmarshalContext), (Integer) 42); }