@Test
public void testMatchListPrefixIllegalArguments() {

  String[][] invalidArgs = {
    {"my-prefix", null},
    {"my-prefix", ""},
    // Even if prefix is null, the argument-check should throw.
    {null, null},
    {null, ""},
  };
  for (String[] args : invalidArgs) {
    IllegalArgumentException iae =
        assertThrows(
            IllegalArgumentException.class,
            () ->
                GoogleCloudStorageStrings.matchListPrefix(
                    args[0], args[1], ListObjectOptions.DEFAULT));
    assertThat(iae).hasMessageThat().matches(".*objectName.*");
  }
}