Test that CheckCodeOwnerConfigFiles REST endpoint requires authentication

This slightly increases the test coverage from 89% to 90.1%.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I6a813107aa472207f3f8994574cfdf16a0f7af3f
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CheckCodeOwnerConfigFilesIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CheckCodeOwnerConfigFilesIT.java
index 5be55be..91e8ca2 100644
--- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CheckCodeOwnerConfigFilesIT.java
+++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/CheckCodeOwnerConfigFilesIT.java
@@ -71,6 +71,14 @@
   }
 
   @Test
+  public void requiresAuthenticatedUser() throws Exception {
+    requestScopeOperations.setApiUserAnonymous();
+    AuthException authException =
+        assertThrows(AuthException.class, () -> checkCodeOwnerConfigFilesIn(project));
+    assertThat(authException).hasMessageThat().contains("Authentication required");
+  }
+
+  @Test
   public void requiresCallerToBeProjectOwner() throws Exception {
     requestScopeOperations.setApiUser(user.id());
     AuthException authException =