@Test public void testUpsertNormal() throws Exception { Observable<ResourceResponse<Document>> mockResponse = getMockedObservableForSingleResource(blobMetadata); when(mockumentClient.upsertDocument(anyString(), any(), any(RequestOptions.class), anyBoolean())).thenReturn( mockResponse); cosmosAccessor.upsertMetadata(blobMetadata); assertEquals(1, azureMetrics.documentCreateTime.getCount()); }
ResourceResponse<Document> upsertMetadata(CloudBlobMetadata blobMetadata) throws DocumentClientException { RequestOptions options = getRequestOptions(blobMetadata.getPartitionId()); return executeCosmosAction( () -> asyncDocumentClient.upsertDocument(cosmosCollectionLink, blobMetadata, options, true) .toBlocking() .single(), azureMetrics.documentCreateTime); }
CosmosDataAccessor { ResourceResponse<Document> upsertMetadata(CloudBlobMetadata blobMetadata) throws DocumentClientException { RequestOptions options = getRequestOptions(blobMetadata.getPartitionId()); return executeCosmosAction( () -> asyncDocumentClient.upsertDocument(cosmosCollectionLink, blobMetadata, options, true) .toBlocking() .single(), azureMetrics.documentCreateTime); } }
CosmosDataAccessor { ResourceResponse<Document> upsertMetadata(CloudBlobMetadata blobMetadata) throws DocumentClientException { RequestOptions options = getRequestOptions(blobMetadata.getPartitionId()); return executeCosmosAction( () -> asyncDocumentClient.upsertDocument(cosmosCollectionLink, blobMetadata, options, true) .toBlocking() .single(), azureMetrics.documentCreateTime); } CosmosDataAccessor(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig, VcrMetrics vcrMetrics,
      AzureMetrics azureMetrics);   CosmosDataAccessor(AsyncDocumentClient asyncDocumentClient, String cosmosCollectionLink, VcrMetrics vcrMetrics,
      AzureMetrics azureMetrics); }
CosmosDataAccessor { ResourceResponse<Document> upsertMetadata(CloudBlobMetadata blobMetadata) throws DocumentClientException { RequestOptions options = getRequestOptions(blobMetadata.getPartitionId()); return executeCosmosAction( () -> asyncDocumentClient.upsertDocument(cosmosCollectionLink, blobMetadata, options, true) .toBlocking() .single(), azureMetrics.documentCreateTime); } CosmosDataAccessor(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig, VcrMetrics vcrMetrics,
      AzureMetrics azureMetrics);   CosmosDataAccessor(AsyncDocumentClient asyncDocumentClient, String cosmosCollectionLink, VcrMetrics vcrMetrics,
      AzureMetrics azureMetrics); String queryChangeFeed(String requestContinuationToken, int maxFeedSize, List<CloudBlobMetadata> changeFeed,
      String partitionPath, Timer timer); }
CosmosDataAccessor { ResourceResponse<Document> upsertMetadata(CloudBlobMetadata blobMetadata) throws DocumentClientException { RequestOptions options = getRequestOptions(blobMetadata.getPartitionId()); return executeCosmosAction( () -> asyncDocumentClient.upsertDocument(cosmosCollectionLink, blobMetadata, options, true) .toBlocking() .single(), azureMetrics.documentCreateTime); } CosmosDataAccessor(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig, VcrMetrics vcrMetrics,
      AzureMetrics azureMetrics);   CosmosDataAccessor(AsyncDocumentClient asyncDocumentClient, String cosmosCollectionLink, VcrMetrics vcrMetrics,
      AzureMetrics azureMetrics); String queryChangeFeed(String requestContinuationToken, int maxFeedSize, List<CloudBlobMetadata> changeFeed,
      String partitionPath, Timer timer); static final String COSMOS_LAST_UPDATED_COLUMN; }