@Test
void assertsToNodeWorksWithRequiredFields() {

    TraceMetadata am = new TraceMetadata.Builder()
            .id("a")
            .version("b")
            .type("c")
            .timestamp("d")
            .homepage("hp")
            .typeVersion("tv")
            .build();
    ObjectNode node = am.toNode();
    assertThat(node.expectStringMember(TraceMetadata.ID_TEXT).getValue(), equalTo("a"));
    assertThat(node.expectStringMember(TraceMetadata.VERSION_TEXT).getValue(), equalTo("b"));
    assertThat(node.expectStringMember(TraceMetadata.TYPE_TEXT).getValue(), equalTo("c"));
    assertThat(node.expectStringMember(TraceMetadata.TIMESTAMP_TEXT).getValue(), equalTo("d"));
    assertThat(node.expectStringMember(TraceMetadata.HOMEPAGE_TEXT).getValue(), equalTo("hp"));
    assertThat(node.expectStringMember(TraceMetadata.TYPE_VERSION_TEXT).getValue(), equalTo("tv"));
}