ObjectMapper mapper = new ObjectMapper();
InputStream in = getClass().getResourceAsStream("bulk-error.json");
JsonParser parser = mapper.getJsonFactory().createJsonParser(in);
ParsingUtils.seek("items", new JacksonJsonParser(parser));
BackportedObjectReader r = BackportedObjectReader.create(mapper, Map.class);
for (Iterator<Map> iterator = r.readValues(parser); iterator.hasNext();) {
Map map = mapper.readValue(parser, Map.class);
String error = (String) ((Map) map.values().iterator().next()).get("error");
assertNotNull(error);
assertTrue(error.contains("document already exists"));
}