@Test
public void omitsEmptiesFromSerializedNode() {

    TraitFactory provider = TraitFactory.createServiceFactory();
    ObjectNode node = Node.objectNode()
            .withMember("uri", Node.from("https://www.amazon.com"));
    Optional<Trait> trait = provider.createTrait(
            ShapeId.from("smithy.api#xmlNamespace"), ShapeId.from("ns.qux#foo"), node);
    assertTrue(trait.isPresent());
    assertThat(trait.get(), instanceOf(XmlNamespaceTrait.class));
    ObjectNode serialized = ((XmlNamespaceTrait) trait.get()).createNode().expectObjectNode();
    assertFalse(serialized.getMember("prefix").isPresent());
}