Code review comment: I have added test cases for Integer, String.

Code under review:
public void queryItemsAggregate() {
        long startTime = Instant.now().getEpochSecond();
        List<String> actualIds = new ArrayList<>();
        EncryptionPojo properties = getItem(UUID.randomUUID().toString());
        cosmosEncryptionAsyncContainer.createItem(properties, new PartitionKey(properties.getMypk()),
            new CosmosItemRequestOptions()).block();
        actualIds.add(properties.getId());
        properties = getItem(UUID.randomUUID().toString());
        cosmosEncryptionAsyncContainer.createItem(properties, new PartitionKey(properties.getMypk()),
            new CosmosItemRequestOptions()).block();
        actualIds.add(properties.getId());
        properties = getItem(UUID.randomUUID().toString());
        cosmosEncryptionAsyncContainer.createItem(properties, new PartitionKey(properties.getMypk()),
            new CosmosItemRequestOptions()).block();
        actualIds.add(properties.getId());

        
        String query1 = String.format("Select value max(c._ts) from c");
        CosmosQueryRequestOptions cosmosQueryRequestOptions1 = new CosmosQueryRequestOptions();

        SqlQuerySpec querySpec1 = new SqlQuerySpec(query1);
        CosmosPagedFlux<JsonNode> feedResponseIterator1 =
            cosmosEncryptionAsyncContainer.queryItems(querySpec1, cosmosQueryRequestOptions1, JsonNode.class);
        List<JsonNode> feedResponse1 = feedResponseIterator1.byPage().blockFirst().getResults();
        int timeStamp = feedResponse1.get(0).asInt();
        long endTime = Instant.now().getEpochSecond();





        assertThat(timeStamp).isGreaterThanOrEqualTo((int)startTime);
        assertThat(timeStamp).isLessThanOrEqualTo((int)endTime);
        assertThat(feedResponse1.size()).isEqualTo(1);

        
        String query2 = String.format("Select top 1 value count(c) from c order by c._ts");
        CosmosQueryRequestOptions cosmosQueryRequestOptions2 = new CosmosQueryRequestOptions();

        SqlQuerySpec querySpec2 = new SqlQuerySpec(query2);
        CosmosPagedFlux<EncryptionPojo> feedResponseIterator2 =
            cosmosEncryptionAsyncContainer.queryItems(querySpec2, cosmosQueryRequestOptions2, EncryptionPojo.class);
        List<EncryptionPojo> feedResponse2 = feedResponseIterator2.byPage().blockFirst().getResults();
        assertThat(feedResponse2.size()).isEqualTo(1);
    }

Line commented on: CosmosPagedFlux<JsonNode> feedResponseIterator1 =

Revised code:
public void queryItemsAggregate() {
        long startTime = Instant.now().getEpochSecond();
        List<String> actualIds = new ArrayList<>();
        EncryptionPojo properties = getItem(UUID.randomUUID().toString());
        cosmosEncryptionAsyncContainer.createItem(properties, new PartitionKey(properties.getMypk()),
            new CosmosItemRequestOptions()).block();
        actualIds.add(properties.getId());
        properties = getItem(UUID.randomUUID().toString());
        cosmosEncryptionAsyncContainer.createItem(properties, new PartitionKey(properties.getMypk()),
            new CosmosItemRequestOptions()).block();
        actualIds.add(properties.getId());
        properties = getItem(UUID.randomUUID().toString());
        cosmosEncryptionAsyncContainer.createItem(properties, new PartitionKey(properties.getMypk()),
            new CosmosItemRequestOptions()).block();
        actualIds.add(properties.getId());

        
        String query1 = String.format("Select value max(c._ts) from c");
        CosmosQueryRequestOptions cosmosQueryRequestOptions1 = new CosmosQueryRequestOptions();

        SqlQuerySpec querySpec1 = new SqlQuerySpec(query1);
        CosmosPagedFlux<Integer> feedResponseIterator1 =
            cosmosEncryptionAsyncContainer.queryItems(querySpec1, cosmosQueryRequestOptions1, Integer.class);
        List<Integer> feedResponse1 = feedResponseIterator1.byPage().blockFirst().getResults();
        int timeStamp = feedResponse1.get(0);
        long endTime = Instant.now().getEpochSecond();

        assertThat(timeStamp).isGreaterThanOrEqualTo((int)startTime);
        assertThat(timeStamp).isLessThanOrEqualTo((int)endTime);
        assertThat(feedResponse1.size()).isEqualTo(1);

        
        String query2 = String.format("Select top 1 value count(c) from c order by c._ts");
        CosmosQueryRequestOptions cosmosQueryRequestOptions2 = new CosmosQueryRequestOptions();

        SqlQuerySpec querySpec2 = new SqlQuerySpec(query2);
        CosmosPagedFlux<Integer> feedResponseIterator2 =
            cosmosEncryptionAsyncContainer.queryItems(querySpec2, cosmosQueryRequestOptions2, Integer.class);
        List<Integer> feedResponse2 = feedResponseIterator2.byPage().blockFirst().getResults();
        assertThat(feedResponse2.size()).isEqualTo(1);

        
        String query3 = String.format("Select value max(c.sensitiveString) from c");
        CosmosQueryRequestOptions cosmosQueryRequestOptions3 = new CosmosQueryRequestOptions();

        SqlQuerySpec querySpec3 = new SqlQuerySpec(query3);
        CosmosPagedFlux<String> feedResponseIterator3 =
            cosmosEncryptionAsyncContainer.queryItems(querySpec3, cosmosQueryRequestOptions3, String.class);
        List<String> feedResponse3 = feedResponseIterator3.byPage().blockFirst().getResults();
        assertThat(feedResponse3.size()).isEqualTo(1);
    }