private void runCopyVersion(String projectSlug, String versionSlug,
String newVersionSlug) {
service.copyVersion(projectSlug, versionSlug, newVersionSlug,
new CopyVersionTaskHandle());
HProjectIteration existingVersion = projectIterationDAO.getBySlug(
projectSlug, versionSlug);
HProjectIteration newVersion =
projectIterationDAO.getBySlug(projectSlug, newVersionSlug);
assertVersion(existingVersion, newVersion, newVersionSlug,
existingVersion.getStatus());
for (Map.Entry<String, HDocument> entry : newVersion.getDocuments()
.entrySet()) {
HDocument existingDoc = existingVersion.getDocuments().get(
entry.getValue().getDocId());
HDocument newDoc = entry.getValue();