@Test
public void testExtendUploadSingleCredentials()
{

    // Create a response.
    UploadSingleCredentialExtensionResponse response =
        new UploadSingleCredentialExtensionResponse(AWS_ASSUMED_ROLE_ACCESS_KEY, AWS_ASSUMED_ROLE_SECRET_KEY, AWS_ASSUMED_ROLE_SESSION_TOKEN,
            AWS_ASSUMED_ROLE_SESSION_EXPIRATION_TIME);
    // Mock the external calls.
    when(uploadDownloadService
        .extendUploadSingleCredentials(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, DATA_VERSION))
        .thenReturn(response);
    // Call the method under test.
    UploadSingleCredentialExtensionResponse result = uploadDownloadRestController
        .extendUploadSingleCredentials(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, DATA_VERSION);
    // Verify the external calls.
    verify(uploadDownloadService)
        .extendUploadSingleCredentials(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE, DATA_VERSION);
    verifyNoMoreInteractionsHelper();
    // Validate the results.
    assertEquals(response, result);
}