@Test
public void upload_multipartUpload_enforceMd5() {

    // results in 2 parts
    UploadConfiguration uploadConfiguration =
            UploadConfiguration.builder()
                    .minimumLengthForMultipartUpload(10)
                    .lengthPerUploadPart(10)
                    .enforceMd5(true)
                    .build();
    UploadManager uploadManager =
            new UploadManager(objectStorage, uploadConfiguration) {
                @Override
                protected MultipartObjectAssembler createAssembler(
                        PutObjectRequest request,
                        UploadRequest uploadRequest,
                        ExecutorService executorService) {
                    return assembler;
                }
            };
    UploadRequest request = createUploadRequest();
    when(assembler.commit())
            .thenReturn(
                    CommitMultipartUploadResponse.builder()
                            .eTag("finalEtag")
                            .opcRequestId(REQ_ID)
                            .opcClientRequestId(CLIENT_REQ_ID)
                            .build());
    UploadResponse uploadResponse = uploadManager.upload(request);
    assertNotNull(uploadResponse);
    verify(assembler).newRequest(CONTENT_TYPE, CONTENT_LANG, CONTENT_ENCODING, METADATA);
    verify(assembler, times(2))
            .addPart(
                    any(InputStream.class),
                    eq(CONTENT_LENGTH / 2), // 10 MiB
                    eq("5W4QR5ShjfX0H20th7TMZw==")); // 'a' times content-length
}