@Test
public void createsListOfArrays() throws Exception {

    ArrayValue childArray1 = createJsonArray(createJsonBook(createJavaScriptBook()));
    ArrayValue childArray2 = createJsonArray(createJsonBook(createJunitBook()), createJsonBook(createCSharpBook()));
    ArrayValue jsonArray = createJsonArray(childArray1, childArray2);
    List list = ObjectBuilder.createCollection(List.class, newParameterizedType(List.class, Book[].class), jsonArray);
    assertEquals(2, list.size());
    assertArrayEquals(new Book[]{createJavaScriptBook()}, (Object[])list.get(0));
    assertArrayEquals(new Book[]{createJunitBook(), createCSharpBook()}, (Object[])list.get(1));
}