Map<String, String> changeSetHeaders = new HashMap<String, String>();
changeSetHeaders.put("content-type", "application/json");
changeSetHeaders.put("content-Id", "111");
String body = "/9j/4AAQSkZJRgABAQEBLAEsAAD/4RM0RXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEA";
BatchChangeSetPart changeRequest = BatchChangeSetPart.method(POST)
.uri("Employees")
.body(body)
.headers(changeSetHeaders)
.build();
BatchChangeSet changeSet = BatchChangeSet.newBuilder().build();
changeSet.add(changeRequest);
batch.add(changeSet);
Map<String, String> changeSetHeaders2 = new HashMap<String, String>();
changeSetHeaders2.put("content-type", "application/json;odata=verbose");
changeSetHeaders2.put("content-Id", "222");
BatchChangeSetPart changeRequest2 = BatchChangeSetPart.method(PUT)
.uri("Employees('2')/ManagerId")
.body("{\"ManagerId\":1}")
.headers(changeSetHeaders2)
.build();
BatchChangeSet changeSet2 = BatchChangeSet.newBuilder().build();