@Test
public void convertsObjectWithEnumsToJson() throws Exception {

    BeanWithEnums beanWithEnums = createBeanWithEnums();
    JsonValue jsonValue = JsonGenerator.createJsonObject(beanWithEnums);
    assertTrue(jsonValue.isObject());
    assertionHelper.assertThatJsonHasAllFieldsFromObject(beanWithEnums, jsonValue);
}