private void assertPayload(String expected, Element configRoot) {
        ConfigPayload payload = ConfigPayload.fromBuilder(
                new DomConfigPayloadBuilder(null).build(configRoot));
        try {
            ByteArrayOutputStream a = new ByteArrayOutputStream();
            new JsonFormat(true).encode(a, payload.getSlime());
            assertEquals(expected, a.toString());
        } catch (Exception e) {
            fail("Exception thrown when encoding slime: " + e.getMessage());
        }
    }
Tests for the {@link com.yahoo.vespa.model.builder.xml.dom.DomConfigPayloadBuilder} class.

@author gjoranv
@author Ulf Lilleengen
config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilderTest.java