### Question:
DefaultJsonEnvelope implements JsonEnvelope { @Override public JsonObject payloadAsJsonObject() { return (JsonObject) payload; } DefaultJsonEnvelope(final Metadata metadata, final JsonValue payload); @Override Metadata metadata(); @Override JsonValue payload(); @Override JsonObject payloadAsJsonObject(); @Override JsonArray payloadAsJsonArray(); @Override JsonNumber payloadAsJsonNumber(); @Override JsonString payloadAsJsonString(); @Override JsonObject asJsonObject(); @Override String toString(); @Override String toDebugStringPrettyPrint(); @Override String toObfuscatedDebugString();  }### Answer:
@Test public void shouldReturnPayloadAsJsonObject() { assertThat(envelopeFrom(metadata, payloadAsJsonObject).payloadAsJsonObject(), equalTo(payloadAsJsonObject)); }