@Test
public void arrayContainingDifferentLengthObjectsJson() throws LoadException {

  // GIVEN
  String json =
      "[ { \"a\": 1, \"c\": [ { \"d\": 4 }, { \"d\": 5}, { \"d\": 6 } ]}," + "{\"a\": 2, \"c\": [ { \"d\": 1 } ] } ]";
  // WHEN
  TableShard tableShard =
      Iterables.getOnlyElement(loader.load(0L, new BigByteBuffer(json.getBytes()), TABLE, colInfo));
  // THEN
  Assert.assertEquals(tableShard.getLongColumns().size(), 5, "Expected all long columns to be available");
  Set<Pair<Long, List<Long>>> expectedValues = new HashSet<>();
  expectedValues.add(new Pair<>(1L, Arrays.asList(new Long[] { 4L, 5L, 6L })));
  expectedValues.add(new Pair<>(2L, Arrays.asList(new Long[] { 1L })));
  Set<Pair<Long, List<Long>>> actualValues = new HashSet<>();
  LongStandardColumnShard colA = tableShard.getLongColumns().get("a");
  LongStandardColumnShard[] colD = new LongStandardColumnShard[] {
      tableShard.getLongColumns().get(repeatedColNames.repeatedAtIndex("c", 0) + ".d"),
      tableShard.getLongColumns().get(repeatedColNames.repeatedAtIndex("c", 1) + ".d"),
      tableShard.getLongColumns().get(repeatedColNames.repeatedAtIndex("c", 2) + ".d") };
  LongStandardColumnShard colCLength = tableShard.getLongColumns().get(repeatedColNames.repeatedLength("c"));
  for (long i = tableShard.getLowestRowId(); i < tableShard.getLowestRowId()
      + tableShard.getNumberOfRowsInShard(); i++) {
    Long valueA = resolveSingleRowValue(colA, i);
    List<Long> valueD = new ArrayList<>();
    for (int c = 0; c < resolveSingleRowValue(colCLength, i); c++)
      valueD.add(resolveSingleRowValue(colD[c], i));
    actualValues.add(new Pair<>(valueA, valueD));
  }
  Assert.assertEquals(actualValues, expectedValues, "Expected correct values to be encoded");
}