@Test
public void upload_singleUpload() throws IOException {

    UploadConfiguration uploadConfiguration =
            UploadConfiguration.builder().allowMultipartUploads(false).build();
    UploadManager uploadManager = new UploadManager(objectStorage, uploadConfiguration);
    UploadRequest request = createUploadRequest();
    ArgumentCaptor<PutObjectRequest> putRequestCaptor =
            ArgumentCaptor.forClass(PutObjectRequest.class);
    PutObjectResponse putResponse =
            PutObjectResponse.builder()
                    .eTag("etag")
                    .opcContentMd5("md5")
                    .opcRequestId(REQ_ID)
                    .opcClientRequestId(CLIENT_REQ_ID)
                    .build();
    when(objectStorage.putObject(putRequestCaptor.capture())).thenReturn(putResponse);
    UploadResponse uploadResponse = uploadManager.upload(request);
    assertNotNull(uploadResponse);
    assertEquals("etag", uploadResponse.getETag());
    assertEquals("md5", uploadResponse.getContentMd5());
    assertNull(uploadResponse.getMultipartMd5());
    assertEquals(REQ_ID, uploadResponse.getOpcRequestId());
    assertEquals(CLIENT_REQ_ID, uploadResponse.getOpcClientRequestId());
    byte[] buffer = new byte[(int) CONTENT_LENGTH];
    putRequestCaptor.getValue().getPutObjectBody().read(buffer);
    assertEquals(CONTENT, new String(buffer));
    assertSame(
            UploadManager.RETRY_CONFIGURATION,
            putRequestCaptor.getValue().getRetryConfiguration());
    assertEquals(CONTENT_LENGTH, putRequestCaptor.getValue().getContentLength().longValue());
    assertEquals(CLIENT_REQ_ID, putRequestCaptor.getValue().getOpcClientRequestId());
    assertSame(METADATA, putRequestCaptor.getValue().getOpcMeta());
}