Merge branch 'stable-3.0'

* stable-3.0:
  ReadOnlyByHttpIT: Extend to cover both 'readonly' and 'readonly~readonly'
  ReadOnlyByHttpIT: Extend assertions on response content
  ReadOnly: Format with google-java-format
  Allow endpoint "config/server/readonly"
  REST: Report state from PUT and DELETE

Change-Id: I0fbe2e131e646a2a6c8051d8fc699af53e9ee40b
diff --git a/WORKSPACE b/WORKSPACE
index 694e70e..220d335 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,24 +3,24 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "51049da0140c58ee26f8285bca4393c5e43ce4a1",
+    commit = "d826d85285bb22d3fe817fe165a7e1d3472f65fa",
     #local_path = "/home/<user>/projects/bazlets",
 )
 
 # Release Plugin API
-load(
-    "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
-    "gerrit_api",
-)
-
-# Snapshot Plugin API
 #load(
-#    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
-#    "gerrit_api_maven_local",
+#    "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
+#    "gerrit_api",
 #)
 
+# Snapshot Plugin API
+load(
+    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
+    "gerrit_api_maven_local",
+)
+
 # Load release Plugin API
-gerrit_api()
+#gerrit_api()
 
 # Load snapshot Plugin API
-#gerrit_api_maven_local()
+gerrit_api_maven_local()
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);