}
}
@Test
public void testUpdateMembership() throws Exception {
final BoxGroup group = createGroup();
try {
final BoxGroupMembership membership = createMembership(group.getId());
final Map<String, Object> headers = new HashMap<String, Object>();
// parameter type is String
headers.put("CamelBox.membershipId", membership.getId());
// parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxGroupMembershipRequestObject
final BoxGroupMembershipRequestObject requestObject =
BoxGroupMembershipRequestObject.updateMembershipRequestObject(BoxGroupMembership.ROLE_ADMIN);
headers.put("CamelBox.groupMembershipRequest", requestObject);
BoxGroupMembership result = requestBodyAndHeaders("direct://UPDATEMEMBERSHIP", null, headers);
assertNotNull("updateMembership result", result);
LOG.debug("updateMembership: " + result);
} finally {
deleteGroup(group.getId());
}
}