diff --git a/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactory.java b/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactory.java index a3af03a..a79a3b4 100644 --- a/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactory.java +++ b/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactory.java @@ -77,11 +77,6 @@ public String supportedType() { return S3BucketSchema.TYPE; } - @Override - public boolean canHandle(DataFlowStartMessage request) { - return S3BucketSchema.TYPE.equals(request.getDestinationDataAddress().getType()); - } - @Override public DataSink createSink(DataFlowStartMessage request) { var validationResult = validateRequest(request); diff --git a/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactory.java b/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactory.java index 8a9bd32..e0dffaf 100644 --- a/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactory.java +++ b/extensions/data-plane/data-plane-aws-s3/src/main/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactory.java @@ -71,11 +71,6 @@ public String supportedType() { return S3BucketSchema.TYPE; } - @Override - public boolean canHandle(DataFlowStartMessage request) { - return S3BucketSchema.TYPE.equals(request.getSourceDataAddress().getType()); - } - @Override public DataSource createSource(DataFlowStartMessage request) { var validationResult = validateRequest(request); diff --git a/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactoryTest.java b/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactoryTest.java index 9fb4535..4d65ffe 100644 --- a/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactoryTest.java +++ b/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSinkFactoryTest.java @@ -53,24 +53,6 @@ class S3DataSinkFactoryTest { private final S3DataSinkFactory factory = new S3DataSinkFactory(clientProvider, mock(), mock(), vault, typeManager.getMapper(), 1024, validator); - @Test - void canHandle_returnsTrueWhenExpectedType() { - var dataAddress = DataAddress.Builder.newInstance().type(S3BucketSchema.TYPE).build(); - - var result = factory.canHandle(createRequest(dataAddress)); - - assertThat(result).isTrue(); - } - - @Test - void canHandle_returnsFalseWhenUnexpectedType() { - var dataAddress = DataAddress.Builder.newInstance().type("any").build(); - - var result = factory.canHandle(createRequest(dataAddress)); - - assertThat(result).isFalse(); - } - @Test void validate_shouldSucceed_whenValidatorSucceeds() { when(validator.validateDestination(any())).thenReturn(ValidationResult.success()); diff --git a/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactoryTest.java b/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactoryTest.java index 6dce519..665f459 100644 --- a/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactoryTest.java +++ b/extensions/data-plane/data-plane-aws-s3/src/test/java/org/eclipse/edc/connector/dataplane/aws/s3/S3DataSourceFactoryTest.java @@ -54,24 +54,6 @@ class S3DataSourceFactoryTest { private final S3DataSourceFactory factory = new S3DataSourceFactory(clientProvider, mock(), vault, typeManager.getMapper(), validator); - @Test - void canHandle_returnsTrueWhenExpectedType() { - var dataAddress = DataAddress.Builder.newInstance().type(S3BucketSchema.TYPE).build(); - - var result = factory.canHandle(createRequest(dataAddress)); - - assertThat(result).isTrue(); - } - - @Test - void canHandle_returnsFalseWhenUnexpectedType() { - var dataAddress = DataAddress.Builder.newInstance().type("any").build(); - - var result = factory.canHandle(createRequest(dataAddress)); - - assertThat(result).isFalse(); - } - @Test void validate_shouldSucceed_whenValidatorSucceeds() { when(validator.validateSource(any())).thenReturn(ValidationResult.success());