@Test
public void processMarshalingTreeInteger() throws IOException {

    ObjectNode source = MarshaledReplacementObjectNode.of(
        INTEGER_MARSHALER,
        RawObjectNode.of(STRING_MARSHALER, "42")
    );
    List<Marshaler<?>> marshalers = Arrays.asList(STRING_MARSHALER, INTEGER_MARSHALER);
    ObjectNode actual
        = MarshalingTreeBuilder.processMarshalingTree(source, marshalers, (path, marshaler, object) -> true);
    Assert.assertEquals(
        actual,
        MarshaledReplacementObjectNode.of(
            INTEGER_MARSHALER,
            MarshaledReplacementObjectNode.of(
                STRING_MARSHALER,
                ByteSequenceNode.of(ByteSequences.arrayBacked("42".getBytes(StandardCharsets.UTF_8)))
            )
        )
    );
    // Verify that marshaling is idempotent (if parameters are the same)
    Assert.assertEquals(
        MarshalingTreeBuilder.processMarshalingTree(actual, marshalers, (path, marshaler, object) -> true),
        MarshaledReplacementObjectNode.of(
            INTEGER_MARSHALER,
            MarshaledReplacementObjectNode.of(
                STRING_MARSHALER,
                ByteSequenceNode.of(ByteSequences.arrayBacked("42".getBytes(StandardCharsets.UTF_8)))
            )
        )
    );
}