@Test
  public void testIsAccountContainerMatch() {
    BlobId blobId = getRandomBlobId(version);
    if (version == BLOB_ID_V1) {
      assertTrue("isAccountContainerMatch() should always return true for  V1 blobID.",
          blobId.isAccountContainerMatch(blobId.getAccountId(), blobId.getContainerId()));
      assertTrue("isAccountContainerMatch() should always return true for  V1 blobID.",
          blobId.isAccountContainerMatch((short) -1, (short) -1));
      assertTrue("isAccountContainerMatch() should always return true for  V1 blobID.",
          blobId.isAccountContainerMatch(getRandomShort(random), getRandomShort(random)));
    } else {
      assertTrue("isAccountContainerMatch() should return true because account and container match.",
          blobId.isAccountContainerMatch(blobId.getAccountId(), blobId.getContainerId()));
      assertFalse("isAccountContainerMatch() should return false because account or container mismatch.",
          blobId.isAccountContainerMatch(blobId.getAccountId(), (short) -1));
      assertFalse("isAccountContainerMatch() should return false because account or container mismatch.",
          blobId.isAccountContainerMatch(blobId.getAccountId(), getRandomShort(random)));
      assertFalse("isAccountContainerMatch() should return false because account or container mismatch.",
          blobId.isAccountContainerMatch((short) -1, blobId.getContainerId()));
      assertFalse("isAccountContainerMatch() should return false because account or container mismatch.",
          blobId.isAccountContainerMatch(getRandomShort(random), blobId.getContainerId()));
      assertFalse("isAccountContainerMatch() should return false because account or container mismatch.",
          blobId.isAccountContainerMatch((short) -1, (short) -1));
      assertFalse("isAccountContainerMatch() should return false because account or container mismatch.",
          blobId.isAccountContainerMatch(getRandomShort(random), getRandomShort(random)));
    }
  }
Test for {@link BlobId#isAccountContainerMatch}.
For BLOB_ID_V1, {@link BlobId#isAccountContainerMatch} should always return true.
For BLOB_ID_V2 and BLOB_ID_V3, return true only when both account and container match.
ambry-commons/src/test/java/com/github/ambry/commons/BlobIdTest.java