@Test
public void shouldReturnEnvelopeAsString() {

    final UUID metadataId = randomUUID();
    final String metadataName = "nameABC123";
    final String source = "sourceName";
    final JsonEnvelope envelope = envelopeFrom(
            metadataBuilder().withId(metadataId).withName(metadataName).withSource(source),
            createObjectBuilder()
                    .add("strProperty", "valueA")
                    .add("nested", createObjectBuilder()
                            .add("strProperty1", "valueB")
                            .add("uuidProperty1", randomUUID().toString())
                            .add("numProperty1", 34)
                            .add("boolProperty1", true))
                    .add("arrayProperty", createArrayBuilder()
                            .add("value1")
                            .add("value2")
                            .add("value3"))
                    .build());
    with(envelope.toString())
            .assertEquals("id", metadataId.toString())
            .assertEquals("name", metadataName)
            .assertEquals("source" , source)
            .assertNotDefined("strProperty")
            .assertNotDefined("nested.strProperty1")
            .assertNotDefined("nested.uuidProperty1")
            .assertNotDefined("nested.numProperty1")
            .assertNotDefined("nested.boolProperty1")
            .assertNotDefined("arrayProperty");
}