@Test
public void marshalPerson() throws IOException {

    Person person = new Person(42, "Alice");
    List<Marshaler<?>> marshalers = Arrays.asList(INTEGER_MARSHALER, STRING_MARSHALER, PERSON_MARSHALER);
    ObjectNode actual = MarshalingTreeBuilder.marshal(person, marshalers, (path, marshaler, object) -> true);
    Assert.assertEquals(
        actual,
        MarshalingTreeNode.MarshaledObjectNode.of(
            PERSON_MARSHALER,
            new MapBuilder<Key, MarshalingTreeNode>(new LinkedHashMap<>())
                .put(
                    SimpleName.identifier("age"),
                    MarshaledReplacementObjectNode.of(
                        INTEGER_MARSHALER,
                        MarshaledReplacementObjectNode.of(
                            STRING_MARSHALER,
                            ByteSequenceNode.of(ByteSequences.arrayBacked("42".getBytes(StandardCharsets.UTF_8)))
                        )
                    )
                )
                .put(
                    SimpleName.identifier("name"),
                    ByteSequenceNode.of(ByteSequences.arrayBacked("Alice".getBytes(StandardCharsets.UTF_8)))
                )
                .toMap()
        )
    );
    Assert.assertEquals(MarshalingTreeUnmarshalSource.unmarshal(actual, getClass().getClassLoader()), person);
}