MultipartObjectAssembler { public AbortMultipartUploadResponse abort() { validateState(true); transferManager.abortAll(); manifest.markUploadAborted(); return service.abortMultipartUpload( AbortMultipartUploadRequest.builder() .invocationCallback(invocationCallback) .namespaceName(namespaceName) .bucketName(bucketName) .objectName(objectName) .uploadId(manifest.getUploadId()) .opcClientRequestId(createClientRequestId("-abort")) .build()); } @Deprecated  MultipartObjectAssembler(
            ObjectStorage service,
            String namespaceName,
            String bucketName,
            String objectName,
            boolean allowOverwrite,
            ExecutorService executorService); @Builder private  MultipartObjectAssembler(
            ObjectStorage service,
            String namespaceName,
            String bucketName,
            String objectName,
            boolean allowOverwrite,
            ExecutorService executorService,
            String opcClientRequestId,
            Consumer<Invocation.Builder> invocationCallback,
            RetryConfiguration retryConfiguration); synchronized MultipartManifest newRequest(
            String contentType,
            String contentLanguage,
            String contentEncoding,
            Map<String, String> opcMeta); synchronized MultipartManifest resumeRequest(String uploadId); int addPart(File file, String md5); int addPart(InputStream stream, long contentLength, String md5); void setPart(File file, String md5, int partNum); void setPart(InputStream stream, long contentLength, String md5, int partNum); AbortMultipartUploadResponse abort(); CommitMultipartUploadResponse commit();  }
@Test public void abort() { String uploadId = "uploadId"; initializeCreateMultipartUpload(uploadId); MultipartManifest manifest = assembler.newRequest(CONTENT_TYPE, CONTENT_LANGUAGE, CONTENT_ENCODING, OPC_META); when(service.abortMultipartUpload(any(AbortMultipartUploadRequest.class))) .thenReturn(AbortMultipartUploadResponse.builder().build()); assertFalse(manifest.isUploadAborted()); assertNotNull(assembler.abort()); assertTrue(manifest.isUploadAborted()); ArgumentCaptor<AbortMultipartUploadRequest> captor = ArgumentCaptor.forClass(AbortMultipartUploadRequest.class); verify(service).abortMultipartUpload(captor.capture()); AbortMultipartUploadRequest request = captor.getValue(); assertEquals(NAMESPACE, request.getNamespaceName()); assertEquals(BUCKET, request.getBucketName()); assertEquals(uploadId, request.getUploadId()); assertEquals(mockInvocationCallback, request.getInvocationCallback()); }