@Test
  public void getFindTokenTest() throws IOException {
    short version = 0;
    Random random = new Random();
    long bytesRead = random.nextLong();
    String startContinuationToken = "start";
    String endContinuationToken = "end";
    int totalItems = random.nextInt();
    int index = random.nextInt() % totalItems;
    String azureRequestId = UUID.randomUUID().toString();

    CosmosChangeFeedFindToken cosmosChangeFeedFindToken1 =
        new CosmosChangeFeedFindToken(bytesRead, startContinuationToken, endContinuationToken, index, totalItems,
            azureRequestId, version);
    DataInputStream stream = new DataInputStream(new ByteArrayInputStream(cosmosChangeFeedFindToken1.toBytes()));
    CosmosChangeFeedFindToken cosmosChangeFeedFindToken2 =
        (CosmosChangeFeedFindToken) new CosmosChangeFeedFindTokenFactory().getFindToken(stream);
    assertEquals("incorrect token returned from factory", cosmosChangeFeedFindToken1, cosmosChangeFeedFindToken2);
  }
test get find token from stream
@throws IOException if an IO exception happens during deserialization
ambry-cloud/src/test/java/com/github/ambry/cloud/azure/CosmosChangeFeedFindTokenFactoryTest.java