@Test
public void testObjectOrEmpty() {

    assertSame("empty object returns empty object for any key",
            JsonValue.EMPTY_JSON_OBJECT,
            objectOrEmpty(JsonValue.EMPTY_JSON_OBJECT, "someKey"));
    assertEquals("object returns present object for present key with object value",
            Json.createObjectBuilder().add("foo", "bar").build(),
            objectOrEmpty(key("someKey", key("foo", "bar")).get(), "someKey"));
}