kwizart commented on code in PR #11626:
URL: https://github.com/apache/nifi/pull/11626#discussion_r3936470287


##########
nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestCopyS3Object.java:
##########
@@ -52,6 +55,12 @@ public class TestCopyS3Object {
     @BeforeEach
     void setUp() {
         mockS3Client = mock(S3Client.class);
+        final S3Utilities mockS3Utilities = mock(S3Utilities.class);
+        when(mockS3Client.utilities()).thenReturn(mockS3Utilities);
+        
when(mockS3Utilities.getUrl(any(GetUrlRequest.class))).thenAnswer(invocation -> 
{
+            final GetUrlRequest request = invocation.getArgument(0);
+            return new 
URL("https://%s.s3.amazonaws.com/%s".formatted(request.bucket(), 
request.key()));
+        });

Review Comment:
   Thanks for the review. Using a real S3Utilities is indeed relevant, but 
shows the following testError:
     NullPointer Region must not be null.
   
   I'm squashing an updated commit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to