{
String json = "{\"employees\":[2,1,"
+ "{\"id\":1,\"name\":\"First\",\"manager\":null,\"reports\":[2]},"
+ "{\"id\":2,\"name\":\"Second\",\"manager\":1,\"reports\":[]}"
+ "]}";
Company company = mapper.readValue(json, Company.class);
assertEquals(4, company.employees.size());
// Deser must keep object ordering.
Employee firstEmployee = company.employees.get(1);
Employee secondEmployee = company.employees.get(0);
assertSame(firstEmployee, company.employees.get(2));