This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit aa7e8d0f6a705721368ee6d14b899973a441c3a4 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Mar 8 14:41:06 2022 +0100 CAMEL-17763: cleaned up unused exceptions in camel-aws2-lambda --- .../lambda/LambdaComponentClientRegistryTest.java | 2 +- .../lambda/LambdaComponentConfigurationTest.java | 6 +-- .../aws2/lambda/LambdaComponentSpringTest.java | 46 ++++++++++---------- .../LambdaComponentVerifierExtensionTest.java | 6 +-- .../lambda/LambdaProducerDefaultFunctionTest.java | 6 +-- .../component/aws2/lambda/LambdaProducerTest.java | 50 +++++++++++----------- .../integration/LambdaComponentManualIT.java | 12 +++--- .../lambda/integration/LambdaCreateFunctionIT.java | 4 +- .../lambda/integration/LambdaDeleteFunctionIT.java | 6 +-- .../lambda/integration/LambdaGetFunctionIT.java | 6 +-- .../lambda/integration/LambdaListFunctionsIT.java | 6 +-- .../lambda/integration/LambdaPublishVersionIT.java | 6 +-- 12 files changed, 78 insertions(+), 78 deletions(-) diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java index 601976a..0c1d754 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentClientRegistryTest.java @@ -41,7 +41,7 @@ public class LambdaComponentClientRegistryTest extends CamelTestSupport { } @Test - public void createEndpointWithMinimalKMSClientMisconfiguration() throws Exception { + public void createEndpointWithMinimalKMSClientMisconfiguration() { Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class); assertThrows(PropertyBindingException.class, () -> { diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java index 55c8b88..179a103 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentConfigurationTest.java @@ -45,7 +45,7 @@ public class LambdaComponentConfigurationTest extends CamelTestSupport { } @Test - public void createEndpointWithoutOperation() throws Exception { + public void createEndpointWithoutOperation() { Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class); assertThrows(IllegalArgumentException.class, () -> { component.createEndpoint("aws2-lambda://myFunction"); @@ -53,7 +53,7 @@ public class LambdaComponentConfigurationTest extends CamelTestSupport { } @Test - public void createEndpointWithoutAmazonLambdaClientConfiguration() throws Exception { + public void createEndpointWithoutAmazonLambdaClientConfiguration() { Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class); assertThrows(IllegalArgumentException.class, () -> { component.createEndpoint("aws2-lambda://myFunction?operation=getFunction"); @@ -61,7 +61,7 @@ public class LambdaComponentConfigurationTest extends CamelTestSupport { } @Test - public void createEndpointWithoutAccessKeyConfiguration() throws Exception { + public void createEndpointWithoutAccessKeyConfiguration() { Lambda2Component component = context.getComponent("aws2-lambda", Lambda2Component.class); assertThrows(IllegalArgumentException.class, () -> { component.createEndpoint("aws2-lambda://myFunction?operation=getFunction&secretKey=yyy"); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentSpringTest.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentSpringTest.java index d7837a2..890da56 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentSpringTest.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentSpringTest.java @@ -54,7 +54,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class LambdaComponentSpringTest extends CamelSpringTestSupport { @Test - public void lambdaCreateFunctionTest() throws Exception { + public void lambdaCreateFunctionTest() { Exchange exchange = template.send("direct:createFunction", ExchangePattern.InOut, new Processor() { @Override @@ -81,11 +81,11 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { } @Test - public void lambdaDeleteFunctionTest() throws Exception { + public void lambdaDeleteFunctionTest() { Exchange exchange = template.send("direct:deleteFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -93,11 +93,11 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { } @Test - public void lambdaGetFunctionTest() throws Exception { + public void lambdaGetFunctionTest() { Exchange exchange = template.send("direct:getFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -106,11 +106,11 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { } @Test - public void lambdaGetFunctionPojoTest() throws Exception { + public void lambdaGetFunctionPojoTest() { Exchange exchange = template.send("direct:getFunctionPojo", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody(GetFunctionRequest.builder().functionName("GetHelloWithName").build()); } }); @@ -119,10 +119,10 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { } @Test - public void lambdaListFunctionsTest() throws Exception { + public void lambdaListFunctionsTest() { Exchange exchange = template.send("direct:listFunctions", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -133,10 +133,10 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { } @Test - public void lambdaInvokeFunctionTest() throws Exception { + public void lambdaInvokeFunctionTest() { Exchange exchange = template.send("direct:invokeFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("{\"name\":\"Camel\"}"); } }); @@ -149,7 +149,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { public void lambdaCreateEventSourceMappingTest() throws Exception { Exchange exchange = template.send("direct:createEventSourceMapping", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.EVENT_SOURCE_ARN, "arn:aws:sqs:eu-central-1:643534317684:testqueue"); exchange.getIn().setHeader(Lambda2Constants.EVENT_SOURCE_BATCH_SIZE, 100); @@ -165,7 +165,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { public void lambdaDeleteEventSourceMappingTest() throws Exception { Exchange exchange = template.send("direct:deleteEventSourceMapping", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.EVENT_SOURCE_UUID, "a1239494949382882383"); } }); @@ -179,7 +179,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { public void lambdaListEventSourceMappingTest() throws Exception { Exchange exchange = template.send("direct:listEventSourceMapping", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); assertMockEndpointsSatisfied(); @@ -194,7 +194,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:listTags", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.RESOURCE_ARN, "arn:aws:lambda:eu-central-1:643534317684:function:GetHelloWithName"); } @@ -210,7 +210,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:tagResource", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Map<String, String> tags = new HashMap<>(); tags.put("test", "added-tag"); exchange.getIn().setHeader(Lambda2Constants.RESOURCE_ARN, @@ -229,7 +229,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:untagResource", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { List<String> tagKeys = new ArrayList<>(); tagKeys.add("test"); exchange.getIn().setHeader(Lambda2Constants.RESOURCE_ARN, @@ -248,7 +248,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:publishVersion", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.VERSION_DESCRIPTION, "This is my description"); } }); @@ -265,7 +265,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:listVersions", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.VERSION_DESCRIPTION, "This is my description"); } }); @@ -282,7 +282,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:createAlias", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_DESCRIPTION, "an alias"); exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_NAME, "alias"); exchange.getIn().setHeader(Lambda2Constants.FUNCTION_VERSION, "1"); @@ -302,7 +302,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:deleteAlias", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_NAME, "alias"); } }); @@ -317,7 +317,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:getAlias", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_NAME, "alias"); } }); @@ -335,7 +335,7 @@ public class LambdaComponentSpringTest extends CamelSpringTestSupport { Exchange exchange = template.send("direct:listAliases", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_VERSION, "1"); } }); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentVerifierExtensionTest.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentVerifierExtensionTest.java index ca9766d..f5bacb1 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentVerifierExtensionTest.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaComponentVerifierExtensionTest.java @@ -37,7 +37,7 @@ public class LambdaComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testParameters() throws Exception { + public void testParameters() { Component component = context().getComponent("aws2-lambda"); ComponentVerifierExtension verifier @@ -56,7 +56,7 @@ public class LambdaComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testConnectivity() throws Exception { + public void testConnectivity() { Component component = context().getComponent("aws2-lambda"); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); @@ -74,7 +74,7 @@ public class LambdaComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testConnectivityAndRegion() throws Exception { + public void testConnectivityAndRegion() { Component component = context().getComponent("aws2-lambda"); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerDefaultFunctionTest.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerDefaultFunctionTest.java index bc75cf5..301ded56 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerDefaultFunctionTest.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerDefaultFunctionTest.java @@ -41,7 +41,7 @@ public class LambdaProducerDefaultFunctionTest extends CamelTestSupport { public void lambdaInvokeFunctionTest() throws Exception { Exchange exchange = template.send("direct:invokeFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("{\"name\":\"Camel\"}"); } }); @@ -52,10 +52,10 @@ public class LambdaProducerDefaultFunctionTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:invokeFunction").to("aws2-lambda://GetHelloWithName?awsLambdaClient=#awsLambdaClient") .to("mock:result"); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerTest.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerTest.java index 61f52ba..d33187f 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerTest.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/LambdaProducerTest.java @@ -63,7 +63,7 @@ public class LambdaProducerTest extends CamelTestSupport { private MockEndpoint mock; @Test - public void lambdaCreateFunctionTest() throws Exception { + public void lambdaCreateFunctionTest() { Exchange exchange = template.send("direct:createFunction", ExchangePattern.InOut, new Processor() { @Override @@ -90,11 +90,11 @@ public class LambdaProducerTest extends CamelTestSupport { } @Test - public void lambdaDeleteFunctionTest() throws Exception { + public void lambdaDeleteFunctionTest() { Exchange exchange = template.send("direct:deleteFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -102,11 +102,11 @@ public class LambdaProducerTest extends CamelTestSupport { } @Test - public void lambdaGetFunctionTest() throws Exception { + public void lambdaGetFunctionTest() { Exchange exchange = template.send("direct:getFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -115,11 +115,11 @@ public class LambdaProducerTest extends CamelTestSupport { } @Test - public void lambdaGetFunctionPojoTest() throws Exception { + public void lambdaGetFunctionPojoTest() { Exchange exchange = template.send("direct:getFunctionPojo", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody(GetFunctionRequest.builder().functionName("GetHelloWithName").build()); } }); @@ -128,10 +128,10 @@ public class LambdaProducerTest extends CamelTestSupport { } @Test - public void lambdaListFunctionsTest() throws Exception { + public void lambdaListFunctionsTest() { Exchange exchange = template.send("direct:listFunctions", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -142,10 +142,10 @@ public class LambdaProducerTest extends CamelTestSupport { } @Test - public void lambdaInvokeFunctionTest() throws Exception { + public void lambdaInvokeFunctionTest() { Exchange exchange = template.send("direct:invokeFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setBody("{\"name\":\"Camel\"}"); } }); @@ -158,7 +158,7 @@ public class LambdaProducerTest extends CamelTestSupport { public void lambdaCreateEventSourceMappingTest() throws Exception { Exchange exchange = template.send("direct:createEventSourceMapping", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.EVENT_SOURCE_ARN, "arn:aws:sqs:eu-central-1:643534317684:testqueue"); exchange.getIn().setHeader(Lambda2Constants.EVENT_SOURCE_BATCH_SIZE, 100); @@ -174,7 +174,7 @@ public class LambdaProducerTest extends CamelTestSupport { public void lambdaDeleteEventSourceMappingTest() throws Exception { Exchange exchange = template.send("direct:deleteEventSourceMapping", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.EVENT_SOURCE_UUID, "a1239494949382882383"); } }); @@ -188,7 +188,7 @@ public class LambdaProducerTest extends CamelTestSupport { public void lambdaListEventSourceMappingTest() throws Exception { Exchange exchange = template.send("direct:listEventSourceMapping", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); assertMockEndpointsSatisfied(); @@ -203,7 +203,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:listTags", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.RESOURCE_ARN, "arn:aws:lambda:eu-central-1:643534317684:function:GetHelloWithName"); } @@ -219,7 +219,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:tagResource", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Map<String, String> tags = new HashMap<>(); tags.put("test", "added-tag"); exchange.getIn().setHeader(Lambda2Constants.RESOURCE_ARN, @@ -238,7 +238,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:untagResource", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { List<String> tagKeys = new ArrayList<>(); tagKeys.add("test"); exchange.getIn().setHeader(Lambda2Constants.RESOURCE_ARN, @@ -257,7 +257,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:publishVersion", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.VERSION_DESCRIPTION, "This is my description"); } }); @@ -274,7 +274,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:listVersions", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.VERSION_DESCRIPTION, "This is my description"); } }); @@ -291,7 +291,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:createAlias", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_DESCRIPTION, "an alias"); exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_NAME, "alias"); exchange.getIn().setHeader(Lambda2Constants.FUNCTION_VERSION, "1"); @@ -311,7 +311,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:deleteAlias", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_NAME, "alias"); } }); @@ -326,7 +326,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:getAlias", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_ALIAS_NAME, "alias"); } }); @@ -344,7 +344,7 @@ public class LambdaProducerTest extends CamelTestSupport { Exchange exchange = template.send("direct:listAliases", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.FUNCTION_VERSION, "1"); } }); @@ -358,10 +358,10 @@ public class LambdaProducerTest extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:createFunction") .to("aws2-lambda://GetHelloWithName?awsLambdaClient=#awsLambdaClient&operation=createFunction") .to("mock:result"); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaComponentManualIT.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaComponentManualIT.java index 65f4c83..df6850a 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaComponentManualIT.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaComponentManualIT.java @@ -39,11 +39,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; public class LambdaComponentManualIT extends CamelTestSupport { @Test - public void lambdaListFunctionsTest() throws Exception { + public void lambdaListFunctionsTest() { Exchange exchange = template.send("direct:listFunctions", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -52,11 +52,11 @@ public class LambdaComponentManualIT extends CamelTestSupport { } @Test - public void lambdaGetFunctionTest() throws Exception { + public void lambdaGetFunctionTest() { Exchange exchange = template.send("direct:getFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -68,10 +68,10 @@ public class LambdaComponentManualIT extends CamelTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:listFunctions") .to("aws2-lambda://myFunction?operation=listFunctions&accessKey={{aws.manual.access.key}}&secretKey={{aws.manual.secret.key}}®ion=eu-west-1"); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaCreateFunctionIT.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaCreateFunctionIT.java index de9a845..44c6d24 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaCreateFunctionIT.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaCreateFunctionIT.java @@ -73,10 +73,10 @@ public class LambdaCreateFunctionIT extends Aws2LambdaBase { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { String awsEndpoint = "aws2-lambda://GetHelloWithName?operation=createFunction"; from("direct:createFunction").to(awsEndpoint).to("mock:result"); } diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaDeleteFunctionIT.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaDeleteFunctionIT.java index ace3f81..10c46e0 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaDeleteFunctionIT.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaDeleteFunctionIT.java @@ -65,7 +65,7 @@ public class LambdaDeleteFunctionIT extends Aws2LambdaBase { template.send("direct:deleteFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -76,10 +76,10 @@ public class LambdaDeleteFunctionIT extends Aws2LambdaBase { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { String awsEndpoint = "aws2-lambda://GetHelloWithName?operation=createFunction"; String deleteFunction = "aws2-lambda://GetHelloWithName?operation=deleteFunction"; from("direct:createFunction").to(awsEndpoint); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaGetFunctionIT.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaGetFunctionIT.java index 21c121e..b7d393a 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaGetFunctionIT.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaGetFunctionIT.java @@ -66,7 +66,7 @@ public class LambdaGetFunctionIT extends Aws2LambdaBase { template.send("direct:getFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -80,10 +80,10 @@ public class LambdaGetFunctionIT extends Aws2LambdaBase { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { String awsEndpoint = "aws2-lambda://GetHelloWithName?operation=createFunction"; String getFunction = "aws2-lambda://GetHelloWithName?operation=getFunction"; from("direct:createFunction").to(awsEndpoint); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaListFunctionsIT.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaListFunctionsIT.java index 3b1e6b5..09c8478 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaListFunctionsIT.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaListFunctionsIT.java @@ -66,7 +66,7 @@ public class LambdaListFunctionsIT extends Aws2LambdaBase { template.send("direct:listFunction", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { } }); @@ -81,10 +81,10 @@ public class LambdaListFunctionsIT extends Aws2LambdaBase { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { String awsEndpoint = "aws2-lambda://GetHelloWithName?operation=createFunction"; String listFunction = "aws2-lambda://GetHelloWithName?operation=listFunctions"; from("direct:createFunction").to(awsEndpoint); diff --git a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaPublishVersionIT.java b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaPublishVersionIT.java index 3315762..49634c9 100644 --- a/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaPublishVersionIT.java +++ b/components/camel-aws/camel-aws2-lambda/src/test/java/org/apache/camel/component/aws2/lambda/integration/LambdaPublishVersionIT.java @@ -66,7 +66,7 @@ public class LambdaPublishVersionIT extends Aws2LambdaBase { template.send("direct:publishVersion", ExchangePattern.InOut, new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(Lambda2Constants.VERSION_DESCRIPTION, "This is my description"); } }); @@ -79,10 +79,10 @@ public class LambdaPublishVersionIT extends Aws2LambdaBase { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { String awsEndpoint = "aws2-lambda://GetHelloWithName?operation=createFunction"; String publishVersion = "aws2-lambda://GetHelloWithName?operation=publishVersion"; from("direct:createFunction").to(awsEndpoint);