assertThat((Long) fieldsVisitor.fields().get("field3").get(0), equalTo(1l));
assertThat((Long) fieldsVisitor.fields().get("field3").get(1), equalTo(2l));
assertThat((Long) fieldsVisitor.fields().get("field3").get(2), equalTo(3l));
// Make sure the doc gets loaded as if it was stored in the new way
fieldsVisitor.reset();
searcher.doc(1, fieldsVisitor);
fieldsVisitor.postProcess(mapper);
assertThat(fieldsVisitor.fields().size(), equalTo(3));
assertThat(fieldsVisitor.fields().get("field1").size(), equalTo(1));
assertThat((Integer) fieldsVisitor.fields().get("field1").get(0), equalTo(1));