@Test
public void convertsMapToJson() throws Exception {

    Map<String, Book> books = ImmutableMap.of("0", junitBook,
                                              "1", csharpBook,
                                              "2", javaScriptBook);
    JsonValue jsonValue = JsonGenerator.createJsonObjectFromMap(books);
    assertTrue(jsonValue.isObject());
    assertionHelper.assertThatJsonHasAllItemsFromMap(books, jsonValue);
}