Adapt to change Ib55038627c in Gerrit core

Change-Id: Iab9e00468845494017cf5f376b55976bd587c3a9
diff --git a/src/main/java/com/googlesource/gerrit/plugins/simplesubmitrules/rules/NoUnresolvedCommentsRule.java b/src/main/java/com/googlesource/gerrit/plugins/simplesubmitrules/rules/NoUnresolvedCommentsRule.java
index 0a4e540..57b6db1 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/simplesubmitrules/rules/NoUnresolvedCommentsRule.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/simplesubmitrules/rules/NoUnresolvedCommentsRule.java
@@ -14,8 +14,8 @@
 
 package com.googlesource.gerrit.plugins.simplesubmitrules.rules;
 
+import com.google.gerrit.entities.LegacySubmitRequirement;
 import com.google.gerrit.entities.SubmitRecord;
-import com.google.gerrit.entities.SubmitRequirement;
 import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.extensions.annotations.PluginName;
 import com.google.gerrit.server.config.PluginConfig;
@@ -35,8 +35,8 @@
 @Singleton
 public class NoUnresolvedCommentsRule implements SubmitRule {
   private static final Logger log = LoggerFactory.getLogger(NoUnresolvedCommentsRule.class);
-  private static final SubmitRequirement REQUIREMENT =
-      SubmitRequirement.builder()
+  private static final LegacySubmitRequirement REQUIREMENT =
+      LegacySubmitRequirement.builder()
           .setType("unresolved_comments")
           .setFallbackText("Resolve all comments")
           .build();
diff --git a/src/test/java/com/googlesource/gerrit/plugins/simplesubmitrules/PluginIT.java b/src/test/java/com/googlesource/gerrit/plugins/simplesubmitrules/PluginIT.java
index 3049dc0..147d7d3 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/simplesubmitrules/PluginIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/simplesubmitrules/PluginIT.java
@@ -25,14 +25,13 @@
 import com.google.gerrit.acceptance.RestResponse;
 import com.google.gerrit.acceptance.TestPlugin;
 import com.google.gerrit.common.RawInputUtil;
-import com.google.gerrit.entities.CachedProjectConfig;
 import com.google.gerrit.entities.LabelFunction;
 import com.google.gerrit.entities.LabelType;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.extensions.api.changes.ReviewInput;
 import com.google.gerrit.extensions.client.Side;
 import com.google.gerrit.extensions.common.ChangeInfo;
-import com.google.gerrit.extensions.common.SubmitRequirementInfo;
+import com.google.gerrit.extensions.common.LegacySubmitRequirementInfo;
 import com.google.gerrit.extensions.restapi.RawInput;
 import com.googlesource.gerrit.plugins.simplesubmitrules.api.CommentsRules;
 import com.googlesource.gerrit.plugins.simplesubmitrules.api.LabelDefinition;
@@ -81,8 +80,8 @@
 
     ChangeInfo changeInfo = gApi.changes().id(r.getChangeId()).get();
     assertThat(changeInfo.submittable).isFalse();
-    SubmitRequirementInfo noUnresolveComments =
-        new SubmitRequirementInfo("NOT_READY", "Resolve all comments", "unresolved_comments");
+    LegacySubmitRequirementInfo noUnresolveComments =
+        new LegacySubmitRequirementInfo("NOT_READY", "Resolve all comments", "unresolved_comments");
     assertThat(changeInfo.requirements).containsExactly(noUnresolveComments);
   }
 
@@ -99,8 +98,8 @@
 
     ChangeInfo changeInfo = gApi.changes().id(r.getChangeId()).get();
     assertThat(changeInfo.submittable).isFalse();
-    SubmitRequirementInfo noSelfApproval =
-        new SubmitRequirementInfo(
+    LegacySubmitRequirementInfo noSelfApproval =
+        new LegacySubmitRequirementInfo(
             "NOT_READY", "Approval from non-uploader required", "non_uploader_approval");
     assertThat(changeInfo.requirements).containsExactly(noSelfApproval);
   }
@@ -141,7 +140,8 @@
 
     // Check that the label has the same configs besides the function, which we changed
     LabelType allProjectsCR = projectCache.getAllProjects().getLabelTypes().byLabel("Code-Review");
-    assertThat(localCR.toBuilder().setFunction(allProjectsCR.getFunction()).build()).isEqualTo(allProjectsCR);
+    assertThat(localCR.toBuilder().setFunction(allProjectsCR.getFunction()).build())
+        .isEqualTo(allProjectsCR);
   }
 
   @Test