@Test
  public void listNamedBlobsTest() throws Exception {
    List<NamedBlobRecord> blobs = Arrays.asList(
        new NamedBlobRecord(refAccount.getName(), refContainer.getName(), "blob1", "abc", Utils.Infinite_Time),
        new NamedBlobRecord(refAccount.getName(), refContainer.getName(), "blob2", "def", System.currentTimeMillis()),
        new NamedBlobRecord(refAccount.getName(), refContainer.getName(), "blob3", "ghi", Utils.Infinite_Time));
    Page<NamedBlobRecord> page = new Page<>(blobs, null);
    doListNamedBlobsTest("blob", null, page, null);
    doListNamedBlobsTest("blob", "blob1", page, null);

    // leave off required prefix query param
    doListNamedBlobsTest(null, null, page, RestServiceErrorCode.BadRequest);

    // throw exception in NamedBlobDb
    doListNamedBlobsTest("blob", null, null, RestServiceErrorCode.ServiceUnavailable);
  }
Tests the handling of list named blobs requests.
@throws Exception
ambry-frontend/src/test/java/com/github/ambry/frontend/FrontendRestRequestServiceTest.java