EntityProviderReadProperties consumerProperties = EntityProviderReadProperties.init()
.mergeSemantic(false)
.callback(callbackHandler)
.build();
ODataEntry entry = xec.readEntry(entitySet, reqContent, consumerProperties);
// validate
assertNotNull(entry);
Map<String, Object> properties = entry.getProperties();
assertEquals("1", properties.get("Id"));
assertEquals("Team 1", properties.get("Name"));
assertEquals(Boolean.FALSE, properties.get("isScrumTeam"));
// teams has no inlined content set
ODataFeed employeesFeed = (ODataFeed) properties.get("nt_Employees");
assertNull(employeesFeed);
// get inlined employees feed from callback
employeesFeed = callbackHandler.asFeed("nt_Employees");
List<ODataEntry> employees = employeesFeed.getEntries();
assertEquals(3, employees.size());
ODataEntry employeeNo2 = employees.get(1);
Map<String, Object> employessNo2Props = employeeNo2.getProperties();
assertEquals("Frederic Fall", employessNo2Props.get("EmployeeName"));
assertEquals("2", employessNo2Props.get("RoomId"));
assertEquals(32, employessNo2Props.get("Age"));
Map<String, Object> emp2Location = (Map<String, Object>) employessNo2Props.get("Location");
Map<String, Object> emp2City = (Map<String, Object>) emp2Location.get("City");
assertEquals("69190", emp2City.get("PostalCode"));
assertEquals("Walldorf", emp2City.get("CityName"));
// employees has no inlined content set
ODataEntry inlinedTeam = (ODataEntry) employessNo2Props.get("ne_Team");
assertNull(inlinedTeam);
// get inlined team from callback
inlinedTeam = callbackHandler.asEntry("ne_Team");
assertEquals("1", inlinedTeam.getProperties().get("Id"));
assertEquals("Team 1", inlinedTeam.getProperties().get("Name"));
}