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 6243d14bff1884a958c24db675a41c673c02e0ab Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Fri Apr 8 15:29:47 2022 +0200 CAMEL-17763: cleanup unused exceptions in camel-fhir --- .../camel/component/fhir/FhirCapabilitiesIT.java | 6 ++--- .../camel/component/fhir/FhirConfigurationIT.java | 4 ++-- .../apache/camel/component/fhir/FhirCreateIT.java | 8 +++---- .../fhir/FhirCustomClientConfigurationIT.java | 6 ++--- .../apache/camel/component/fhir/FhirDeleteIT.java | 12 +++++----- .../component/fhir/FhirExtraParametersIT.java | 4 ++-- .../apache/camel/component/fhir/FhirHistoryIT.java | 10 ++++---- .../camel/component/fhir/FhirLoadPageIT.java | 10 ++++---- .../apache/camel/component/fhir/FhirMetaIT.java | 14 +++++------ .../camel/component/fhir/FhirOperationIT.java | 12 +++++----- .../apache/camel/component/fhir/FhirPatchIT.java | 10 ++++---- .../apache/camel/component/fhir/FhirReadIT.java | 28 +++++++++++----------- .../apache/camel/component/fhir/FhirSearchIT.java | 4 ++-- .../apache/camel/component/fhir/FhirSimpleIT.java | 4 ++-- .../camel/component/fhir/FhirTransactionIT.java | 10 ++++---- .../apache/camel/component/fhir/FhirUpdateIT.java | 2 +- .../camel/component/fhir/FhirValidateIT.java | 6 ++--- .../fhir/Hl7v2PatientToFhirPatientIT.java | 4 ++-- .../camel/component/fhir/PatientProcessor.java | 2 +- .../FhirJsonDataformatErrorHandlerTest.java | 2 +- .../FhirXmlDataformatErrorHandlerTest.java | 2 +- .../FhirJsonDataformatErrorHandlerSpringTest.java | 2 +- .../FhirXmlDataformatErrorHandlerSpringTest.java | 2 +- 23 files changed, 82 insertions(+), 82 deletions(-) diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java index 41102073184..727e8ab0d09 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java @@ -43,7 +43,7 @@ public class FhirCapabilitiesIT extends AbstractFhirTestSupport { = FhirApiCollection.getCollection().getApiName(FhirCapabilitiesApiMethod.class).getName(); @Test - public void testOfType() throws Exception { + public void testOfType() { org.hl7.fhir.instance.model.api.IBaseConformance result = requestBody("direct://OF_TYPE", CapabilityStatement.class); LOG.debug("ofType: " + result); @@ -52,7 +52,7 @@ public class FhirCapabilitiesIT extends AbstractFhirTestSupport { } @Test - public void testEncodeJSON() throws Exception { + public void testEncodeJSON() { Map<String, Object> headers = new HashMap<>(); headers.put(ExtraParameters.ENCODE_JSON.getHeaderName(), Boolean.TRUE); @@ -65,7 +65,7 @@ public class FhirCapabilitiesIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for ofType diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java index 89cba931f36..b0ba156115a 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java @@ -83,7 +83,7 @@ public class FhirConfigurationIT extends AbstractFhirTestSupport { } @Test - public void testConfiguration() throws Exception { + public void testConfiguration() { FhirEndpoint endpoint = getMandatoryEndpoint(TEST_URI, FhirEndpoint.class); GenericClient client = (GenericClient) endpoint.getClient(); FhirConfiguration configuration = endpoint.getConfiguration(); @@ -106,7 +106,7 @@ public class FhirConfigurationIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java index 625a6fadca5..e8c8bd56cb6 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java @@ -74,7 +74,7 @@ public class FhirCreateIT extends AbstractFhirTestSupport { } @Test - public void testCreateResource() throws Exception { + public void testCreateResource() { Patient patient = new Patient().addName(new HumanName().addGiven("Vincent").setFamily("Freeman")); MethodOutcome result = requestBody("direct://RESOURCE", patient); @@ -85,7 +85,7 @@ public class FhirCreateIT extends AbstractFhirTestSupport { } @Test - public void testCreateStringResource() throws Exception { + public void testCreateStringResource() { Patient patient = new Patient().addName(new HumanName().addGiven("Vincent").setFamily("Freeman")); String patientString = this.fhirContext.newXmlParser().encodeResourceToString(patient); @@ -97,7 +97,7 @@ public class FhirCreateIT extends AbstractFhirTestSupport { } @Test - public void testCreateStringResourceEncodeXml() throws Exception { + public void testCreateStringResourceEncodeXml() { Patient patient = new Patient().addName(new HumanName().addGiven("Vincent").setFamily("Freeman")); String patientString = this.fhirContext.newXmlParser().encodeResourceToString(patient); Map<String, Object> headers = new HashMap<>(); @@ -110,7 +110,7 @@ public class FhirCreateIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for resource diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java index e0fbc44ce05..d715162a052 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java @@ -78,14 +78,14 @@ public class FhirCustomClientConfigurationIT extends AbstractFhirTestSupport { private CustomClientFactory clientFactory = new CustomClientFactory(); @Test - public void testConfigurationWithCustomClient() throws Exception { + public void testConfigurationWithCustomClient() { FhirEndpoint endpoint = getMandatoryEndpoint(TEST_URI_CUSTOM_CLIENT, FhirEndpoint.class); IGenericClient client = endpoint.getClient(); assertTrue(client instanceof CustomClient); } @Test - public void testConfigurationWithCustomFactory() throws Exception { + public void testConfigurationWithCustomFactory() { FhirEndpoint endpoint = getMandatoryEndpoint(TEST_URI_CUSTOM_CLIENT_FACTORY, FhirEndpoint.class); IGenericClient client = endpoint.getClient(); assertTrue(client instanceof CustomClient); @@ -97,7 +97,7 @@ public class FhirCustomClientConfigurationIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java index 83c4ac9f841..6069efc92b0 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java @@ -43,7 +43,7 @@ public class FhirDeleteIT extends AbstractFhirTestSupport { private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirDeleteApiMethod.class).getName(); @Test - public void testDeleteResource() throws Exception { + public void testDeleteResource() { assertTrue(patientExists()); // using org.hl7.fhir.instance.model.api.IBaseResource message body for single parameter "resource" IBaseOperationOutcome result = requestBody("direct://RESOURCE", this.patient); @@ -54,7 +54,7 @@ public class FhirDeleteIT extends AbstractFhirTestSupport { } @Test - public void testDeleteResourceById() throws Exception { + public void testDeleteResourceById() { assertTrue(patientExists()); // using org.hl7.fhir.instance.model.api.IIdType message body for single parameter "id" @@ -66,7 +66,7 @@ public class FhirDeleteIT extends AbstractFhirTestSupport { } @Test - public void testDeleteResourceByStringId() throws Exception { + public void testDeleteResourceByStringId() { assertTrue(patientExists()); Map<String, Object> headers = new HashMap<>(); @@ -83,7 +83,7 @@ public class FhirDeleteIT extends AbstractFhirTestSupport { } @Test - public void testDeleteResourceConditionalByUrl() throws Exception { + public void testDeleteResourceConditionalByUrl() { assertTrue(patientExists()); IBaseOperationOutcome result @@ -95,7 +95,7 @@ public class FhirDeleteIT extends AbstractFhirTestSupport { } @Test - public void testDeleteResourceConditionalByUrlCacheControlDirective() throws Exception { + public void testDeleteResourceConditionalByUrlCacheControlDirective() { assertTrue(patientExists()); Map<String, Object> headers = new HashMap<>(); headers.put(ExtraParameters.CACHE_CONTROL_DIRECTIVE.getHeaderName(), new CacheControlDirective().setNoCache(true)); @@ -109,7 +109,7 @@ public class FhirDeleteIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for resource diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java index cb744263d24..89e570ece1a 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java @@ -42,7 +42,7 @@ public class FhirExtraParametersIT extends AbstractFhirTestSupport { private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName(); @Test - public void testEncodeRequestToXml() throws Exception { + public void testEncodeRequestToXml() { final Map<String, Object> headers = new HashMap<>(); // encode request to XML headers.put(ExtraParameters.ENCODE_XML.getHeaderName(), Boolean.TRUE); @@ -58,7 +58,7 @@ public class FhirExtraParametersIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for searchByUrl diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java index e46febc2ee2..d16955026c2 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java @@ -43,7 +43,7 @@ public class FhirHistoryIT extends AbstractFhirTestSupport { = FhirApiCollection.getCollection().getApiName(FhirHistoryApiMethod.class).getName(); @Test - public void testOnInstance() throws Exception { + public void testOnInstance() { final Map<String, Object> headers = new HashMap<>(); headers.put("CamelFhir.id", this.patient.getIdElement()); // parameter type is Class @@ -59,7 +59,7 @@ public class FhirHistoryIT extends AbstractFhirTestSupport { } @Test - public void testOnServer() throws Exception { + public void testOnServer() { Map<String, Object> headers = new HashMap<>(); headers.put("CamelFhir.returnType", Bundle.class); headers.put("CamelFhir.count", 1); @@ -71,7 +71,7 @@ public class FhirHistoryIT extends AbstractFhirTestSupport { } @Test - public void testOnType() throws Exception { + public void testOnType() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resourceType", Patient.class); @@ -88,7 +88,7 @@ public class FhirHistoryIT extends AbstractFhirTestSupport { } @Test - public void testOnTypeWithSubsetElements() throws Exception { + public void testOnTypeWithSubsetElements() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resourceType", Patient.class); @@ -107,7 +107,7 @@ public class FhirHistoryIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for onInstance diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java index 1f0f11201aa..8d8d45df21c 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java @@ -50,7 +50,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport { = FhirApiCollection.getCollection().getApiName(FhirLoadPageApiMethod.class).getName(); @Test - public void testByUrl() throws Exception { + public void testByUrl() { String url = "Patient?_count=2"; Bundle bundle = this.fhirClient.search() .byUrl(url) @@ -72,7 +72,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport { } @Test - public void testNext() throws Exception { + public void testNext() { String url = "Patient?_count=2"; Bundle bundle = this.fhirClient.search() .byUrl(url) @@ -87,7 +87,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport { } @Test - public void testPrevious() throws Exception { + public void testPrevious() { String url = "Patient?_count=2"; Bundle bundle = this.fhirClient.search() .byUrl(url) @@ -106,7 +106,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport { } @Test - public void testPreviousWithEncodingEnum() throws Exception { + public void testPreviousWithEncodingEnum() { String url = "Patient?_count=2"; Bundle bundle = this.fhirClient.search() .byUrl(url) @@ -148,7 +148,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for byUrl diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java index fba1036e7db..0959d19eb76 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java @@ -43,7 +43,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirMetaApiMethod.class).getName(); @Test - public void testAdd() throws Exception { + public void testAdd() { //assert no meta Meta meta = fhirClient.meta().get(Meta.class).fromResource(this.patient.getIdElement()).execute(); assertEquals(0, meta.getTag().size()); @@ -63,7 +63,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { } @Test - public void testDelete() throws Exception { + public void testDelete() { //assert no meta Meta meta = fhirClient.meta().get(Meta.class).fromResource(this.patient.getIdElement()).execute(); assertEquals(0, meta.getTag().size()); @@ -88,7 +88,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { } @Test - public void testGetFromResource() throws Exception { + public void testGetFromResource() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.metaType", Meta.class); @@ -103,7 +103,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { } @Test - public void testGetFromServer() throws Exception { + public void testGetFromServer() { // using Class message body for single parameter "metaType" IBaseMetaType result = requestBody("direct://GET_FROM_SERVER", Meta.class); assertNotNull(result, "getFromServer result"); @@ -111,7 +111,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { } @Test - public void testGetFromType() throws Exception { + public void testGetFromType() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.metaType", Meta.class); @@ -125,7 +125,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { } @Test - public void testGetFromTypePreferResponseType() throws Exception { + public void testGetFromTypePreferResponseType() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.metaType", Meta.class); @@ -140,7 +140,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for add diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java index d6e76b653ad..ca4771fcdee 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java @@ -44,7 +44,7 @@ public class FhirOperationIT extends AbstractFhirTestSupport { = FhirApiCollection.getCollection().getApiName(FhirOperationApiMethod.class).getName(); @Test - public void testOnInstance() throws Exception { + public void testOnInstance() { final Map<String, Object> headers = new HashMap<>(); // parameter type is org.hl7.fhir.instance.model.api.IIdType headers.put("CamelFhir.id", this.patient.getIdElement()); @@ -71,7 +71,7 @@ public class FhirOperationIT extends AbstractFhirTestSupport { } @Test - public void testOnInstanceVersion() throws Exception { + public void testOnInstanceVersion() { final Map<String, Object> headers = new HashMap<>(); // parameter type is org.hl7.fhir.instance.model.api.IIdType headers.put("CamelFhir.id", this.patient.getIdElement()); @@ -98,7 +98,7 @@ public class FhirOperationIT extends AbstractFhirTestSupport { } @Test - public void testOnServer() throws Exception { + public void testOnServer() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.name", "$get-resource-counts"); @@ -117,7 +117,7 @@ public class FhirOperationIT extends AbstractFhirTestSupport { } @Test - public void testOnType() throws Exception { + public void testOnType() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resourceType", Patient.class); @@ -142,7 +142,7 @@ public class FhirOperationIT extends AbstractFhirTestSupport { @Disabled("Not implemented yet in HAPI FHIR server side, see" + " https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoMessageHeaderDstu3.java#L33") @Test - public void testProcessMessage() throws Exception { + public void testProcessMessage() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.respondToUri", null); @@ -162,7 +162,7 @@ public class FhirOperationIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for onInstance diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java index 7c4215e9dcd..33f63891d5a 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java @@ -48,7 +48,7 @@ public class FhirPatchIT extends AbstractFhirTestSupport { private static final String PATCH = "[ { \"op\":\"replace\", \"path\":\"/active\", \"value\":true } ]"; @Test - public void testPatchById() throws Exception { + public void testPatchById() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.patchBody", PATCH); @@ -63,7 +63,7 @@ public class FhirPatchIT extends AbstractFhirTestSupport { } @Test - public void testPatchByStringId() throws Exception { + public void testPatchByStringId() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.patchBody", PATCH); @@ -77,7 +77,7 @@ public class FhirPatchIT extends AbstractFhirTestSupport { } @Test - public void testPatchByStringIdPreferResponseTypes() throws Exception { + public void testPatchByStringIdPreferResponseTypes() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.patchBody", PATCH); @@ -96,7 +96,7 @@ public class FhirPatchIT extends AbstractFhirTestSupport { @Test @Disabled(value = "https://github.com/jamesagnew/hapi-fhir/issues/955") - public void testPatchByUrl() throws Exception { + public void testPatchByUrl() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.patchBody", PATCH); @@ -113,7 +113,7 @@ public class FhirPatchIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for patchById diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java index b810b9ff240..a51111cf18d 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java @@ -42,7 +42,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirReadApiMethod.class).getName(); @Test - public void testResourceById() throws Exception { + public void testResourceById() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -55,7 +55,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByLongId() throws Exception { + public void testResourceByLongId() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -68,7 +68,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByStringId() throws Exception { + public void testResourceByStringId() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -81,7 +81,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByIdAndStringResource() throws Exception { + public void testResourceByIdAndStringResource() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resourceClass", "Patient"); @@ -94,7 +94,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByLongIdAndStringResource() throws Exception { + public void testResourceByLongIdAndStringResource() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -107,7 +107,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByStringIdAndStringResource() throws Exception { + public void testResourceByStringIdAndStringResource() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -120,7 +120,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByStringIdAndVersion() throws Exception { + public void testResourceByStringIdAndVersion() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -135,7 +135,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByStringIdAndVersionWithResourceClass() throws Exception { + public void testResourceByStringIdAndVersionWithResourceClass() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resourceClass", "Patient"); @@ -150,7 +150,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByiUrl() throws Exception { + public void testResourceByiUrl() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -163,7 +163,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByUrl() throws Exception { + public void testResourceByUrl() { final Map<String, Object> headers = new HashMap<>(); // parameter type is Class headers.put("CamelFhir.resource", Patient.class); @@ -176,7 +176,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByStringUrlAndStringResource() throws Exception { + public void testResourceByStringUrlAndStringResource() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.resourceClass", "Patient"); @@ -189,7 +189,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByUrlAndStringResource() throws Exception { + public void testResourceByUrlAndStringResource() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.resourceClass", "Patient"); @@ -202,7 +202,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Test - public void testResourceByUrlAndStringResourcePrettyPrint() throws Exception { + public void testResourceByUrlAndStringResourcePrettyPrint() { final Map<String, Object> headers = new HashMap<>(); // parameter type is String headers.put("CamelFhir.resourceClass", "Patient"); @@ -222,7 +222,7 @@ public class FhirReadIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for resourceById diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java index dbf8e4694ba..a16fca00214 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java @@ -38,7 +38,7 @@ public class FhirSearchIT extends AbstractFhirTestSupport { private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName(); @Test - public void testSearchByUrl() throws Exception { + public void testSearchByUrl() { String url = "Patient?given=Vincent&family=Freeman&_format=json"; Bundle result = requestBody("direct://SEARCH_BY_URL", url); @@ -50,7 +50,7 @@ public class FhirSearchIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for searchByUrl diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java index db840c75d09..53653791de7 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java @@ -49,7 +49,7 @@ public class FhirSimpleIT extends AbstractFhirTestSupport { } @Test - public void testCreateResource() throws Exception { + public void testCreateResource() { Patient patient = new Patient().addName(new HumanName().addGiven(GIVEN_NAME).setFamily(FAMILY_NAME)); MethodOutcome result = requestBody("direct://RESOURCE", patient); @@ -72,7 +72,7 @@ public class FhirSimpleIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { from("direct://RESOURCE") diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java index 21319c41085..c3904aaf76d 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java @@ -49,7 +49,7 @@ public class FhirTransactionIT extends AbstractFhirTestSupport { = FhirApiCollection.getCollection().getApiName(FhirTransactionApiMethod.class).getName(); @Test - public void testWithBundle() throws Exception { + public void testWithBundle() { // using org.hl7.fhir.instance.model.api.IBaseBundle message body for single parameter "bundle" Bundle result = requestBody("direct://WITH_BUNDLE", createTransactionBundle()); @@ -59,7 +59,7 @@ public class FhirTransactionIT extends AbstractFhirTestSupport { } @Test - public void testWithStringBundle() throws Exception { + public void testWithStringBundle() { Bundle transactionBundle = createTransactionBundle(); String stringBundle = fhirContext.newJsonParser().encodeResourceToString(transactionBundle); @@ -72,7 +72,7 @@ public class FhirTransactionIT extends AbstractFhirTestSupport { } @Test - public void testWithResources() throws Exception { + public void testWithResources() { Patient oscar = new Patient().addName(new HumanName().addGiven("Oscar").setFamily("Peterson")); Patient bobbyHebb = new Patient().addName(new HumanName().addGiven("Bobby").setFamily("Hebb")); List<IBaseResource> patients = new ArrayList<>(2); @@ -88,7 +88,7 @@ public class FhirTransactionIT extends AbstractFhirTestSupport { } @Test - public void testWithResourcesSummaryEnum() throws Exception { + public void testWithResourcesSummaryEnum() { Patient oscar = new Patient().addName(new HumanName().addGiven("Oscar").setFamily("Peterson")); Patient bobbyHebb = new Patient().addName(new HumanName().addGiven("Bobby").setFamily("Hebb")); List<IBaseResource> patients = new ArrayList<>(2); @@ -106,7 +106,7 @@ public class FhirTransactionIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for withBundle diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java index 0ceabb974a9..7dd3e4984f7 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java @@ -186,7 +186,7 @@ public class FhirUpdateIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for resource diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java index a622e2b8b8d..1185ee209bd 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java @@ -46,7 +46,7 @@ public class FhirValidateIT extends AbstractFhirTestSupport { = FhirApiCollection.getCollection().getApiName(FhirValidateApiMethod.class).getName(); @Test - public void testResource() throws Exception { + public void testResource() { Patient bobbyHebb = new Patient().addName(new HumanName().addGiven("Bobby").setFamily("Hebb")); bobbyHebb.getText().setStatus(Narrative.NarrativeStatus.GENERATED); bobbyHebb.getText().setDivAsString("<div>This is the narrative text</div>"); @@ -67,7 +67,7 @@ public class FhirValidateIT extends AbstractFhirTestSupport { } @Test - public void testResourceAsString() throws Exception { + public void testResourceAsString() { Patient bobbyHebb = new Patient().addName(new HumanName().addGiven("Bobby").setFamily("Hebb")); bobbyHebb.getText().setStatus(Narrative.NarrativeStatus.GENERATED); bobbyHebb.getText().setDivAsString("<div>This is the narrative text</div>"); @@ -89,7 +89,7 @@ public class FhirValidateIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { public void configure() { // test route for resource diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java index 9b82a65d53e..830940b031c 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java @@ -76,9 +76,9 @@ public class Hl7v2PatientToFhirPatientIT extends AbstractFhirTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { - public void configure() throws Exception { + public void configure() { Processor patientProcessor = new PatientProcessor(); from("direct:input") .unmarshal().hl7() diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java index c7f8457e2f4..7ac169d0f2f 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java @@ -29,7 +29,7 @@ import org.hl7.fhir.r4.model.Patient; public class PatientProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { ORU_R01 msg = exchange.getIn().getBody(ORU_R01.class); //map to Patient Patient patient = getPatient(msg); diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java index 401cf74e9cc..c7d74f26872 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java @@ -51,7 +51,7 @@ public class FhirJsonDataformatErrorHandlerTest extends CamelTestSupport { } @Test - public void unmarshalParserErrorHandler() throws Throwable { + public void unmarshalParserErrorHandler() { try { template.sendBody("direct:unmarshalErrorHandlerStrict", INPUT); fail("Expected a DataFormatException"); diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java index c2cd0cd06c4..1c019d010eb 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java @@ -49,7 +49,7 @@ public class FhirXmlDataformatErrorHandlerTest extends CamelTestSupport { } @Test - public void unmarshalParserErrorHandler() throws Throwable { + public void unmarshalParserErrorHandler() { try { template.sendBody("direct:unmarshalErrorHandlerStrict", INPUT); fail("Expected a DataFormatException"); diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirJsonDataformatErrorHandlerSpringTest.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirJsonDataformatErrorHandlerSpringTest.java index ada3da82612..b562c0374e6 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirJsonDataformatErrorHandlerSpringTest.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirJsonDataformatErrorHandlerSpringTest.java @@ -46,7 +46,7 @@ public class FhirJsonDataformatErrorHandlerSpringTest extends CamelSpringTestSup } @Test - public void unmarshalParserErrorHandler() throws Throwable { + public void unmarshalParserErrorHandler() { try { template.sendBody("direct:unmarshalErrorHandlerStrict", INPUT); fail("Expected a DataFormatException"); diff --git a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirXmlDataformatErrorHandlerSpringTest.java b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirXmlDataformatErrorHandlerSpringTest.java index fefc77d8e06..2b1c9ef8fa4 100644 --- a/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirXmlDataformatErrorHandlerSpringTest.java +++ b/components/camel-fhir/camel-fhir-component/src/test/java/org/apache/camel/component/fhir/dataformat/spring/FhirXmlDataformatErrorHandlerSpringTest.java @@ -44,7 +44,7 @@ public class FhirXmlDataformatErrorHandlerSpringTest extends CamelSpringTestSupp } @Test - public void unmarshalParserErrorHandler() throws Throwable { + public void unmarshalParserErrorHandler() { try { template.sendBody("direct:unmarshalErrorHandlerStrict", INPUT); fail("Expected a DataFormatException");