GetArchive: Test request without specifying a format

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I975c09db9a499a59157bb9327a3efa14b2b72432
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/GetArchiveIT.java b/javatests/com/google/gerrit/acceptance/rest/change/GetArchiveIT.java
index 63ed977..de949ea 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/GetArchiveIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/GetArchiveIT.java
@@ -19,13 +19,30 @@
 
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.extensions.client.ArchiveFormat;
+import com.google.gerrit.extensions.restapi.BadRequestException;
 import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
+import org.junit.Before;
 import org.junit.Test;
 
 public class GetArchiveIT extends AbstractDaemonTest {
+  private String changeId;
+
+  @Before
+  public void setUp() throws Exception {
+    changeId = createChange().getChangeId();
+  }
+
+  @Test
+  public void formatNotSpecified() throws Exception {
+    BadRequestException ex =
+        assertThrows(
+            BadRequestException.class,
+            () -> gApi.changes().id(changeId).current().getArchive(null));
+    assertThat(ex).hasMessageThat().isEqualTo("format is not specified");
+  }
+
   @Test
   public void zipFormatIsDisabled() throws Exception {
-    String changeId = createChange().getChangeId();
     MethodNotAllowedException ex =
         assertThrows(
             MethodNotAllowedException.class,