@Test
public void convertsSetToJsonArray() throws Exception {

    Set<Book> books = newHashSet(junitBook, csharpBook, javaScriptBook);
    JsonValue jsonArray = JsonGenerator.createJsonArray(books);
    assertTrue(jsonArray.isArray());
    assertionHelper.assertThatJsonArrayHasAllItemsFromCollection(books, jsonArray);
}