@Test
public void testArrayOrEmpty() {

    assertSame("empty object returns empty array for any key",
            JsonValue.EMPTY_JSON_ARRAY,
            arrayOrEmpty(JsonValue.EMPTY_JSON_OBJECT, "someKey"));
    assertEquals("object returns present object for present key with object value",
            Json.createArrayBuilder().add("foo").add("bar").build(),
            arrayOrEmpty(key("someKey", arr("foo", "bar")).get(), "someKey"));
}