@Test
  public void basicTest() throws InterruptedException, IOException, StoreException {
    // PUT a key that is slated to expire when time advances by 1s
    MockId addedId = put(1, PUT_RECORD_SIZE, time.seconds() + 1).get(0);
    time.sleep(2 * Time.MsPerSec);
    liveKeys.remove(addedId);
    expiredKeys.add(addedId);

    // GET of all the keys implicitly tests the PUT, UPDATE and DELETE.
    // live keys, included undeleted keys
    StoreInfo storeInfo = store.get(new ArrayList<>(liveKeys), EnumSet.noneOf(StoreGetOptions.class));
    checkStoreInfo(storeInfo, liveKeys);

    MockMessageStoreHardDelete hd = (MockMessageStoreHardDelete) hardDelete;
    for (MockId id : deletedKeys) {
      // cannot get without StoreGetOptions
      verifyGetFailure(id, StoreErrorCodes.IDDeleted);

      // with StoreGetOptions.Store_Include_Deleted
      storeInfo = store.get(Collections.singletonList(id), EnumSet.of(StoreGetOptions.Store_Include_Deleted));
      checkStoreInfo(storeInfo, Collections.singleton(id));

      // with all StoreGetOptions
      storeInfo = store.get(Collections.singletonList(id), EnumSet.allOf(StoreGetOptions.class));
      checkStoreInfo(storeInfo, Collections.singleton(id));
    }

    for (MockId id : expiredKeys) {
      // cannot get without StoreGetOptions
      verifyGetFailure(id, StoreErrorCodes.TTLExpired);

      storeInfo = store.get(Collections.singletonList(id), EnumSet.of(StoreGetOptions.Store_Include_Expired));
      checkStoreInfo(storeInfo, Collections.singleton(id));

      // with all StoreGetOptions
      storeInfo = store.get(Collections.singletonList(id), EnumSet.allOf(StoreGetOptions.class));
      checkStoreInfo(storeInfo, Collections.singleton(id));
    }

    // should be able to delete expired blobs
    delete(addedId);

    // non existent ID has to fail
    verifyGetFailure(getUniqueId(), StoreErrorCodes.IDNotFound);

    // Verify the partition failure
    final String newPartitionString = "newPartitionId";
    final long newPartitionLongId = 2L;
    PartitionId newPartitionId = mock(PartitionId.class);
    when(newPartitionId.toString()).thenReturn(newPartitionString);
    when(newPartitionId.getId()).thenReturn(newPartitionLongId);
    when(newPartitionId.getBytes()).thenReturn(new byte[]{0, 2, 0, 0, 0, 0, 0, 0, 0, (byte) newPartitionLongId});
    BlobId blobId =
        new BlobId(BlobId.BLOB_ID_V6, BlobId.BlobIdType.NATIVE, (byte) 1, (short) 1022, (short) 8, newPartitionId,
            false, BlobId.BlobDataType.SIMPLE, UUID.randomUUID().toString());
    long crc = random.nextLong();
    MessageInfo info = new MessageInfo(blobId, 100, false, false, false, expiresAtMs, crc, blobId.getAccountId(),
        blobId.getContainerId(), Utils.Infinite_Time, (short) -1);
    ByteBuffer buffer = ByteBuffer.wrap(TestUtils.getRandomBytes(100));
    List<MessageInfo> infos = new ArrayList<>();
    List<ByteBuffer> buffers = new ArrayList<>();
    infos.add(info);
    buffers.add(buffer);
    try {
      store.put(new MockMessageWriteSet(infos, buffers));
      fail("should fail due to invalid partition");
    } catch (IllegalArgumentException e) {
      assertTrue(e.getMessage().contains("belongs to partition " + newPartitionString));
    }
  }
Does a basic test by getting all the blobs that were put (updated, deleted and undeleted) during the test setup. This
implicitly tests all of PUT, GET, TTL UPDATE, DELETE and UNDELETE.
</p>
Also tests GET with different combinations of {@link StoreGetOptions}.
@throws InterruptedException
@throws IOException
@throws StoreException
ambry-store/src/test/java/com/github/ambry/store/BlobStoreTest.java