GSObject targetObject = new GSObject("target-object-with-sources-metadata");
// Copy an existing source object to the target GSObject
// This will copy the source's object data and metadata to the target object.
boolean replaceMetadata = false;
gsService.copyObject(BUCKET_NAME, TEST_OBJECT_NAME, "target-bucket", targetObject, replaceMetadata);
// You can also copy an object and update its metadata at the same time. Perform a
// copy-in-place (with the same bucket and object names for source and destination)
// to update an object's metadata while leaving the object's data unchanged.
targetObject = new GSObject(TEST_OBJECT_NAME);