Fix test due to change in Gerrit core

I6ba424e09 broke this test by disallowing to remove the change id from
the commit message.

Change-Id: Ic56533dbfd21d073b8814d9f8610a3ad6cf6f748
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/CreateCheckIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/CreateCheckIT.java
index 8848278..b1e0273 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/CreateCheckIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/CreateCheckIT.java
@@ -349,16 +349,20 @@
 
   @Test
   public void createCheckOnChangeEditRejected() throws Exception {
-    int changeId = patchSetId.changeId().get();
-    gApi.changes().id(changeId).edit().modifyCommitMessage("new message");
-    assertThat(gApi.changes().id(changeId).edit().get()).isPresent();
+    int numChangeId = patchSetId.changeId().get();
+    String changeId = gApi.changes().id(numChangeId).get().changeId;
+    gApi.changes()
+        .id(numChangeId)
+        .edit()
+        .modifyCommitMessage("Change edit\n\nChange-Id: " + changeId);
+    assertThat(gApi.changes().id(numChangeId).edit().get()).isPresent();
     CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
 
     CheckInput input = new CheckInput();
     input.checkerUuid = checkerUuid.get();
     input.state = CheckState.RUNNING;
     RestResponse response =
-        adminRestSession.post("/changes/" + changeId + "/revisions/edit/checks~checks", input);
+        adminRestSession.post("/changes/" + numChangeId + "/revisions/edit/checks~checks", input);
 
     response.assertConflict();
     assertThat(response.getEntityContent()).isEqualTo("checks are not supported on a change edit");
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java
index 97fa1a6..ee3c261 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java
@@ -554,8 +554,9 @@
 
   @Test
   public void getCheckOnChangeEditRejected() throws Exception {
-    int changeId = patchSetId.changeId().get();
-    gApi.changes().id(changeId).edit().modifyCommitMessage("new message");
+    int numChangeId = patchSetId.changeId().get();
+    String changeId = gApi.changes().id(numChangeId).get().changeId;
+    gApi.changes().id(changeId).edit().modifyCommitMessage("Change edit\n\nChange-Id: " + changeId);
     Optional<EditInfo> editInfo = gApi.changes().id(changeId).edit().get();
     assertThat(editInfo).isPresent();
 
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
index 1be5870..d21488f 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
@@ -349,7 +349,7 @@
 
   @Test
   public void listAllOnChangeEditRejected() throws Exception {
-    gApi.changes().id(changeId).edit().modifyCommitMessage("new message");
+    gApi.changes().id(changeId).edit().modifyCommitMessage("Change edit\n\nChange-Id: " + changeId);
     Optional<EditInfo> editInfo = gApi.changes().id(changeId).edit().get();
     assertThat(editInfo).isPresent();