@Test
  public void testNullArguments() throws Exception {
    try {
      setRouter();
      assertExpectedThreadCounts(2, 1);
      setOperationParams();

      try {
        router.getBlob(null, new GetBlobOptionsBuilder().build());
        Assert.fail("null blobId should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }
      try {
        router.getBlob("", null);
        Assert.fail("null options should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }
      try {
        router.putBlob(putBlobProperties, putUserMetadata, null, new PutBlobOptionsBuilder().build());
        Assert.fail("null channel should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }
      try {
        router.putBlob(null, putUserMetadata, putChannel, new PutBlobOptionsBuilder().build());
        Assert.fail("null blobProperties should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }
      try {
        router.deleteBlob(null, null);
        Assert.fail("null blobId should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }
      try {
        router.updateBlobTtl(null, null, Utils.Infinite_Time);
        Assert.fail("null blobId should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }

      try {
        router.undeleteBlob(null, null);
        Assert.fail("null blobId should have resulted in IllegalArgumentException");
      } catch (IllegalArgumentException expected) {
      }
      // null user metadata should work.
      router.putBlob(putBlobProperties, null, putChannel, new PutBlobOptionsBuilder().build()).get();
    } finally {
      if (router != null) {
        router.close();
        assertExpectedThreadCounts(0, 0);
        //submission after closing should return a future that is already done.
        assertClosed();
      }
    }
  }
Test behavior with various null inputs to router methods.
@throws Exception
ambry-router/src/test/java/com/github/ambry/router/NonBlockingRouterTest.java