Merge branch 'stable-3.0'

* stable-3.0:
  Upgrade bazlets to latest stable-3.0
  Upgrade bazlets to latest stable-2.16
  Upgrade bazlets to latest stable-2.15 to build with 2.15.18 API
  Bazel: Migrate workspace status script to python
  Upgrade bazlets to latest stable-2.15
  Upgrade bazlets to latest stable-2.14
  Upgrade bazlets to latest stable-2.16
  Upgrade bazlets to latest stable-2.15
  Upgrade bazlets to latest stable-2.14
  Bump Bazel version to 1.1.0

Change-Id: I985f559cdd14b3a94bdd61487ac663d7a379da69
diff --git a/WORKSPACE b/WORKSPACE
index 72d6da4..e9861ee 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,7 +3,7 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "2118fd30e24f339f5daf5310144dcb7a9123bc90",
+    commit = "cf5be217dc024c5e1a001ff24441bef7ac2d90d0",
     #local_path = "/home/<user>/projects/bazlets",
 )
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java b/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
index 2482cab..6a4b916 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
@@ -40,8 +40,8 @@
     }
 
     @Override
-    public String apply(ConfigResource resource) {
-      return state.isReadOnly() ? "on" : "off";
+    public Response<String> apply(ConfigResource resource) {
+      return Response.ok(state.isReadOnly() ? "on" : "off");
     }
   }
 
diff --git a/src/test/java/com/googlesource/gerrit/plugins/readonly/AbstractReadOnlyTest.java b/src/test/java/com/googlesource/gerrit/plugins/readonly/AbstractReadOnlyTest.java
index e24137f..ce8d081 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/readonly/AbstractReadOnlyTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/readonly/AbstractReadOnlyTest.java
@@ -15,6 +15,7 @@
 package com.googlesource.gerrit.plugins.readonly;
 
 import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.testing.GerritJUnit.assertThrows;
 import static org.apache.http.HttpStatus.SC_SERVICE_UNAVAILABLE;
 
 import com.google.gerrit.acceptance.GitUtil;
@@ -146,12 +147,9 @@
     setReadOnly(true);
 
     // Push should fail
-    try {
-      pushTo("refs/for/master");
-      fail("expected TransportException");
-    } catch (TransportException e) {
-      assertThat(e).hasMessageThat().contains("READ ONLY");
-    }
+    TransportException thrown =
+        assertThrows(TransportException.class, () -> pushTo("refs/for/master"));
+    assertThat(thrown).hasMessageThat().contains("READ ONLY");
 
     // Disable read-only
     setReadOnly(false);