@Test
  public void testCleanupBlobGoodCase2() throws Exception {
    Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
    calendar.add(Calendar.DATE, -config.staleDataRetentionDays);
    long afterStaleCutoffTime = calendar.getTimeInMillis() + 5000;

    Account account = accountService.getAllAccounts().iterator().next();
    Container container = account.getAllContainers().iterator().next();
    String blobId = getBlobId(account, container);
    String blobName = "good/" + "case2" + "/more path segments--";
    NamedBlobRecord record =
        new NamedBlobRecord(account.getName(), container.getName(), blobName, blobId, Utils.Infinite_Time);

    time.setCurrentMilliseconds(afterStaleCutoffTime);
    namedBlobDb.put(record, NamedBlobState.READY, true).get();

    time.setCurrentMilliseconds(afterStaleCutoffTime + 1);
    String blobIdNew = getBlobId(account, container);
    NamedBlobRecord recordNew =
        new NamedBlobRecord(account.getName(), container.getName(), blobName, blobIdNew, Utils.Infinite_Time);
    namedBlobDb.put(recordNew, NamedBlobState.READY, true).get();

    List<StaleNamedBlob> staleNamedBlobs = namedBlobDb.pullStaleBlobs().get();
    assertTrue("Good blob case 2 pull stale blob result should be empty!", staleNamedBlobs.isEmpty());
  }
Test behavior with blob cleanup for good blob case
Case 2, created less than staleDataRetentionDays ago, Ready, not largest, and bigger version is ready
ambry-named-mysql/src/integration-test/java/com/github/ambry/named/MySqlNamedBlobDbIntegrationTest.java