}
@Test
public void testContentIdReferencing() throws Exception {
List<BatchPart> batch = new ArrayList<BatchPart>();
BatchChangeSet changeSet = BatchChangeSet.newBuilder().build();
Map<String, String> changeSetHeaders = new HashMap<String, String>();
changeSetHeaders.put("content-type", "application/octet-stream");
changeSetHeaders.put("Accept", "application/atomsvc+xml;q=0.8, application/json;odata=verbose;q=0.5, */*;q=0.1");
BatchChangeSetPart changeRequest = BatchChangeSetPart.method(POST)
.uri("Employees")
.contentId("1")
.body("gAAAAgABwESAAMAAAABAAEA")
.headers(changeSetHeaders)
.build();
changeSet.add(changeRequest);
changeSetHeaders = new HashMap<String, String>();
changeSetHeaders.put("content-type", "application/json;odata=verbose");
BatchChangeSetPart changeRequest2 = BatchChangeSetPart.method(PUT)
.uri("$1/EmployeeName")
.contentId("2")
.body("{\"EmployeeName\":\"Frederic Fall MODIFIED\"}")
.headers(changeSetHeaders)
.build();
changeSet.add(changeRequest2);
batch.add(changeSet);
Map<String, String> getRequestHeaders = new HashMap<String, String>();
getRequestHeaders.put("content-id", "3");
BatchPart request = BatchQueryPart.method(GET)