@Test
public void testGenericArraySupport() throws B2JsonException {

    final ClassWithGenericArrays objectWithGenericArrays =
            new ClassWithGenericArrays(
                    new ItemArray<>(new Integer[] {0, 1, 2, 3}),
                    new ItemArray<>(new String[] {"a", "b"}));
    final String expected = "" +
            "{\n" +
            "  \"intArray\": {\n" +
            "    \"values\": [\n" +
            "      0,\n" +
            "      1,\n" +
            "      2,\n" +
            "      3\n" +
            "    ]\n" +
            "  },\n" +
            "  \"stringArray\": {\n" +
            "    \"values\": [\n" +
            "      \"a\",\n" +
            "      \"b\"\n" +
            "    ]\n" +
            "  }\n" +
            "}";
    assertEquals(expected, b2Json.toJson(objectWithGenericArrays));
}