Adapt to change in Gerrit core that changed the error messages for submit

Change Ic6dbda6de improved the error messages that are returned on
submit when there are problem preventing the change from being
submitted. Adapt the code-owners tests that verified these messages to
the new error messages.

Google-Bug-Id: b/347935402
Change-Id: Ib8674af844d1f6eaebfbc118d9ec179410b3ba96
Signed-off-by: Edwin Kempin <ekempin@google.com>
Reviewed-on: https://gerrit-review.googlesource.com/c/plugins/code-owners/+/430877
Reviewed-by: Kamil Musin <kamilm@google.com>
Tested-by: Zuul <zuul-63@gerritcodereview-ci.iam.gserviceaccount.com>
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java
index e078738..1769dce 100644
--- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java
+++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CodeOwnerSubmitRuleIT.java
@@ -154,8 +154,9 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %d: submit requirement 'Code-Owners' is unsatisfied.",
-                changeInfo._number));
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' is unsatisfied.",
+                changeInfo._number, changeInfo._number));
   }
 
   @Test
@@ -220,8 +221,9 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %d: submit requirement 'Code-Owners' is unsatisfied.",
-                changeInfo._number));
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' is unsatisfied.",
+                changeInfo._number, changeInfo._number));
   }
 
   @Test
@@ -465,13 +467,15 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %s: submit requirement 'Code-Owners' has an"
-                    + " error: Submittability expression result has an error:"
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' has an error:"
+                    + " Submittability expression result has an error:"
                     + " Failed to evaluate code owner statuses for"
-                    + " patch set 1 of change %s (cause: invalid code owner config file '%s'"
+                    + " patch set 1 of change %d (cause: invalid code owner config file '%s'"
                     + " (project = %s, branch = master):\n  %s).%s",
                 changeInfo._number,
                 changeInfo._number,
+                changeInfo._number,
                 JgitPath.of(nameOfInvalidCodeOwnerConfigFile).getAsAbsolutePath(),
                 project,
                 getParsingErrorMessageForNonParseableCodeOwnerConfig(),
@@ -519,13 +523,15 @@
         .isEqualTo(
             String.format(
                 "Failed to submit 1 change due to the following problems:\n"
-                    + "Change %s: submit requirement 'Code-Owners' has an"
+                    + "Change %d: Change %d is not ready:"
+                    + " submit requirement 'Code-Owners' has an"
                     + " error: Submittability expression result has an error:"
                     + " Failed to evaluate code owner statuses for"
-                    + " patch set 1 of change %s (cause: invalid code owner config file '%s'"
+                    + " patch set 1 of change %d (cause: invalid code owner config file '%s'"
                     + " (project = %s, branch = master):\n  %s).",
                 changeInfo._number,
                 changeInfo._number,
+                changeInfo._number,
                 JgitPath.of(nameOfInvalidCodeOwnerConfigFile).getAsAbsolutePath(),
                 project,
                 getParsingErrorMessageForNonParseableCodeOwnerConfig()));