Source:
<code>public void queryItemsWithEventualConsistency() throws Exception{ CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); String idAndPkValue = UUID.randomUUID().toString(); ObjectNode properties = getDocumentDefinition(idAndPkValue, idAndPkValue); CosmosItemResponse<ObjectNode> itemResponse = container.createItem(properties); String query = String.format("SELECT * from c where c.id = '%s'", idAndPkValue); CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions() .setSessionToken(StringUtils.repeat("SomeManualInvalidSessionToken", 2000)) .setConsistencyLevel(ConsistencyLevel.EVENTUAL); CosmosPagedIterable<ObjectNode> feedResponseIterator1 = container.queryItems(query, cosmosQueryRequestOptions, ObjectNode.class); feedResponseIterator1.handle((r) -> System.out.println("Query RequestDiagnostics: " + r.getCosmosDiagnostics().toString())); <START> System.out.println("hello world"); <END> assertThat(feedResponseIterator1.iterator().hasNext()).isTrue(); assertThat(feedResponseIterator1.stream().count() == 1); SqlQuerySpec querySpec = new SqlQuerySpec(query); CosmosPagedIterable<ObjectNode> feedResponseIterator3 = container.queryItems(querySpec, cosmosQueryRequestOptions, ObjectNode.class); feedResponseIterator3.handle((r) -> System.out.println("Query RequestDiagnostics: " + r.getCosmosDiagnostics().toString())); assertThat(feedResponseIterator3.iterator().hasNext()).isTrue(); assertThat(feedResponseIterator3.stream().count() == 1); }</code><technical_language>please remove</technical_language>

Target:
public void queryItemsWithEventualConsistency() throws Exception{ CosmosAsyncContainer asyncContainer = getSharedMultiPartitionCosmosContainer(this.client.asyncClient()); container = client.getDatabase(asyncContainer.getDatabase().getId()).getContainer(asyncContainer.getId()); String idAndPkValue = UUID.randomUUID().toString(); ObjectNode properties = getDocumentDefinition(idAndPkValue, idAndPkValue); CosmosItemResponse<ObjectNode> itemResponse = container.createItem(properties); String query = String.format("SELECT * from c where c.id = '%s'", idAndPkValue); CosmosQueryRequestOptions cosmosQueryRequestOptions = new CosmosQueryRequestOptions() .setSessionToken(StringUtils.repeat("SomeManualInvalidSessionToken", 2000)) .setConsistencyLevel(ConsistencyLevel.EVENTUAL); CosmosPagedIterable<ObjectNode> feedResponseIterator1 = container.queryItems(query, cosmosQueryRequestOptions, ObjectNode.class); feedResponseIterator1.handle( (r) -> logger.info("Query RequestDiagnostics: {}", r.getCosmosDiagnostics().toString())); assertThat(feedResponseIterator1.iterator().hasNext()).isTrue(); assertThat(feedResponseIterator1.stream().count() == 1); SqlQuerySpec querySpec = new SqlQuerySpec(query); CosmosPagedIterable<ObjectNode> feedResponseIterator3 = container.queryItems(querySpec, cosmosQueryRequestOptions, ObjectNode.class); feedResponseIterator3.handle( (r) -> logger.info("Query RequestDiagnostics: {}", r.getCosmosDiagnostics().toString())); assertThat(feedResponseIterator3.iterator().hasNext()).isTrue(); assertThat(feedResponseIterator3.stream().count() == 1); }