Adapt to the latest allowCapability API change on master.

Gerrit master refactored the way integration tests should configure
global capabilities.

Change-Id: Ia3ef6151cbb489da2aba09849cb1e3f2cf330784
diff --git a/src/test/java/com/googlesource/gerrit/libmodule/plugins/test/AbstractGitDaemonTest.java b/src/test/java/com/googlesource/gerrit/libmodule/plugins/test/AbstractGitDaemonTest.java
index bc30e5e..8b1bd0b 100644
--- a/src/test/java/com/googlesource/gerrit/libmodule/plugins/test/AbstractGitDaemonTest.java
+++ b/src/test/java/com/googlesource/gerrit/libmodule/plugins/test/AbstractGitDaemonTest.java
@@ -14,9 +14,12 @@
 
 package com.googlesource.gerrit.libmodule.plugins.test;
 
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allowCapability;
+
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.GitUtil;
 import com.google.gerrit.acceptance.TestAccount;
+import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
 import com.google.gerrit.entities.AccountGroup;
 import com.google.gerrit.extensions.api.groups.GroupApi;
@@ -38,6 +41,7 @@
   private static final String REFS_CHANGES = "+refs/changes/*:refs/remotes/origin/*";
 
   @Inject private RequestScopeOperations requestScopeOperations;
+  @Inject private ProjectOperations projectOperations;
 
   protected void createChangeAndAbandon() throws Exception, RestApiException {
     requestScopeOperations.setApiUser(admin.id());
@@ -58,9 +62,12 @@
     groupApi.removeMembers(admin.username());
     String groupId = groupApi.detail().id;
 
-    allowGlobalCapabilities(
-        AccountGroup.UUID.parse(groupId),
-        "gerrit-" + FilterRefsCapability.HIDE_CLOSED_CHANGES_REFS);
+    projectOperations
+        .allProjectsForUpdate()
+        .add(
+            allowCapability("gerrit-" + FilterRefsCapability.HIDE_CLOSED_CHANGES_REFS)
+                .group(AccountGroup.UUID.parse(groupId)))
+        .update();
   }
 
   protected List<Ref> getChangesRefsAs(TestAccount testAccount) throws Exception {