Repository: camel Updated Branches: refs/heads/camel-2.17.x 7a00489d1 -> f78935eee refs/heads/master 1f9dc80da -> 07b489872
http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java ---------------------------------------------------------------------- diff --git a/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java new file mode 100644 index 0000000..f8651a1 --- /dev/null +++ b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java @@ -0,0 +1,286 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.servicenow; + +import java.util.List; + +import org.apache.camel.CamelExecutionException; +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.component.servicenow.model.Incident; +import org.junit.Test; + +public class ServiceNowTableTest extends ServiceNowTestSupport { + + @Test + public void testRetrieveSome() throws Exception { + MockEndpoint mock = getMockEndpoint("mock:servicenow"); + mock.expectedMessageCount(1); + + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.SYSPARM_LIMIT, "10") + .put(ServiceNowConstants.TABLE, "incident") + .build() + ); + + mock.assertIsSatisfied(); + + Exchange exchange = mock.getExchanges().get(0); + List<Incident> items = exchange.getIn().getBody(List.class); + + assertNotNull(items); + assertTrue(items.size() <= 10); + } + + @Test + public void testIncidentWorkflow() throws Exception { + + Incident incident = null; + String sysId; + String number; + MockEndpoint mock = getMockEndpoint("mock:servicenow"); + + // ************************ + // Create incident + // ************************ + + { + mock.reset(); + mock.expectedMessageCount(1); + + incident = new Incident(); + incident.setDescription("my incident"); + incident.setShortDescription("An incident"); + incident.setSeverity(1); + incident.setImpact(1); + + template().sendBodyAndHeaders( + "direct:servicenow", + incident, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_CREATE) + .put(ServiceNowConstants.TABLE, "incident") + .build() + ); + + mock.assertIsSatisfied(); + + incident = mock.getExchanges().get(0).getIn().getBody(Incident.class); + sysId = incident.getId(); + number = incident.getNumber(); + + LOGGER.info("****************************************************"); + LOGGER.info("* Incident created"); + LOGGER.info("* sysid = {}", sysId); + LOGGER.info("* number = {}", number); + LOGGER.info("****************************************************"); + } + + // ************************ + // Search for the incident + // ************************ + + { + mock.reset(); + mock.expectedMessageCount(1); + + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.TABLE, "incident") + .put(ServiceNowConstants.SYSPARM_QUERY, "number=" + number) + .build() + ); + + mock.assertIsSatisfied(); + + List<Incident> incidents = mock.getExchanges().get(0).getIn().getBody(List.class); + assertEquals(1, incidents.size()); + assertEquals(number, incidents.get(0).getNumber()); + assertEquals(sysId, incidents.get(0).getId()); + } + + // ************************ + // Modify the incident + // ************************ + + { + mock.reset(); + mock.expectedMessageCount(1); + + incident = new Incident(); + incident.setDescription("my incident"); + incident.setShortDescription("The incident"); + incident.setSeverity(2); + incident.setImpact(3); + + template().sendBodyAndHeaders( + "direct:servicenow", + incident, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_MODIFY) + .put(ServiceNowConstants.TABLE, "incident") + .put(ServiceNowConstants.SYSPARM_ID, sysId) + .build() + ); + + mock.assertIsSatisfied(); + + incident = mock.getExchanges().get(0).getIn().getBody(Incident.class); + assertEquals(number, incident.getNumber()); + assertEquals(2, incident.getSeverity()); + assertEquals(3, incident.getImpact()); + assertEquals("The incident", incident.getShortDescription()); + } + + // ************************ + // Retrieve it via query + // ************************ + + { + mock.reset(); + mock.expectedMessageCount(1); + + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.TABLE, "incident") + .put(ServiceNowConstants.SYSPARM_QUERY, "number=" + number) + .build() + ); + + mock.assertIsSatisfied(); + + List<Incident> incidents = mock.getExchanges().get(0).getIn().getBody(List.class); + assertEquals(1, incidents.size()); + assertEquals(number, incidents.get(0).getNumber()); + assertEquals(sysId, incidents.get(0).getId()); + assertEquals(2, incidents.get(0).getSeverity()); + assertEquals(3, incidents.get(0).getImpact()); + assertEquals("The incident", incidents.get(0).getShortDescription()); + } + + // ************************ + // Retrieve by sys id + // ************************ + + { + mock.reset(); + mock.expectedMessageCount(1); + + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.TABLE, "incident") + .put(ServiceNowConstants.SYSPARM_ID, sysId) + .build() + ); + + mock.assertIsSatisfied(); + + incident = mock.getExchanges().get(0).getIn().getBody(Incident.class); + assertEquals(2, incident.getSeverity()); + assertEquals(3, incident.getImpact()); + assertEquals("The incident", incident.getShortDescription()); + assertEquals(number, incident.getNumber()); + } + + // ************************ + // Delete it + // ************************ + + { + mock.reset(); + mock.expectedMessageCount(1); + + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_DELETE) + .put(ServiceNowConstants.TABLE, "incident") + .put(ServiceNowConstants.SYSPARM_ID, sysId) + .build() + ); + + mock.assertIsSatisfied(); + } + + // ************************ + // Retrieve it via query, should fail + // ************************ + + { + try { + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.SYSPARM_QUERY, "number=" + number) + .put(ServiceNowConstants.TABLE, "incident") + .build() + ); + + fail("Record +" + number + " should have been deleted"); + } catch (CamelExecutionException e) { + assertTrue(e.getCause() instanceof ServiceNowException); + // we are good + } + } + } + + // ************************************************************************* + // + // ************************************************************************* + + @Override + protected RouteBuilder createRouteBuilder() throws Exception { + return new RouteBuilder() { + public void configure() { + from("direct:servicenow") + .to("servicenow:{{env:SERVICENOW_INSTANCE}}" + + "?userName={{env:SERVICENOW_USERNAME}}" + + "&password={{env:SERVICENOW_PASSWORD}}" + //+ "&oauthClientId={{env:SERVICENOW_OAUTH2_CLIENT_ID}}" + //+ "&oauthClientSecret={{env:SERVICENOW_OAUTH2_CLIENT_SECRET}}" + + "&model.incident=org.apache.camel.component.servicenow.model.Incident") + .to("log:org.apache.camel.component.servicenow?level=INFO&showAll=true") + .to("mock:servicenow"); + } + }; + } +} http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java ---------------------------------------------------------------------- diff --git a/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java new file mode 100644 index 0000000..2b4730a --- /dev/null +++ b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java @@ -0,0 +1,112 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.component.servicenow; + +import java.util.UUID; + +import org.apache.camel.CamelExecutionException; +import org.apache.camel.builder.RouteBuilder; +import org.junit.Test; + +public class ServiceNowTest extends ServiceNowTestSupport { + + @Test + public void testExceptions() throws Exception { + // 404 + try { + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.SYSPARM_QUERY, "number=" + UUID.randomUUID().toString()) + .put(ServiceNowConstants.TABLE, "incident") + .build() + ); + } catch (CamelExecutionException e) { + assertTrue(e.getCause() instanceof ServiceNowException); + + ServiceNowException sne = (ServiceNowException)e.getCause(); + assertEquals("failure", sne.getStatus()); + assertTrue(sne.getMessage().contains("No Record found")); + assertTrue(sne.getDetail().contains("Records matching query not found")); + } + + // 400 + try { + template().sendBodyAndHeaders( + "direct:servicenow", + null, + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE) + .put(ServiceNowConstants.SYSPARM_QUERY, "number=" + UUID.randomUUID().toString()) + .put(ServiceNowConstants.TABLE, "notExistingTable") + .build() + ); + } catch (CamelExecutionException e) { + assertTrue(e.getCause() instanceof ServiceNowException); + + ServiceNowException sne = (ServiceNowException)e.getCause(); + assertEquals("failure", sne.getStatus()); + assertTrue(sne.getMessage().contains("Invalid table notExistingTable")); + assertNull(sne.getDetail()); + } + } + + @Test + public void testBodyMismatch() throws Exception { + try { + template().sendBodyAndHeaders( + "direct:servicenow", + "NotAnIncidentObject", + new KVBuilder() + .put(ServiceNowConstants.RESOURCE, "table") + .put(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_CREATE) + .put(ServiceNowConstants.TABLE, "incident") + .build() + ); + + fail("Should fail as body is not compatible with model defined in route for table incident"); + } catch (CamelExecutionException e) { + assertTrue(e.getCause() instanceof IllegalArgumentException); + } + } + + // ************************************************************************* + // + // ************************************************************************* + + @Override + protected RouteBuilder createRouteBuilder() throws Exception { + return new RouteBuilder() { + public void configure() { + from("direct:servicenow") + .to("servicenow:{{env:SERVICENOW_INSTANCE}}" + + "?userName={{env:SERVICENOW_USERNAME}}" + + "&password={{env:SERVICENOW_PASSWORD}}" + //+ "&oauthClientId={{env:SERVICENOW_OAUTH2_CLIENT_ID}}" + //+ "&oauthClientSecret={{env:SERVICENOW_OAUTH2_CLIENT_SECRET}}" + + "&model.incident=org.apache.camel.component.servicenow.model.Incident") + .to("log:org.apache.camel.component.servicenow?level=INFO&showAll=true") + .to("mock:servicenow"); + } + }; + } +} http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java ---------------------------------------------------------------------- diff --git a/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java new file mode 100644 index 0000000..706fb22 --- /dev/null +++ b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java @@ -0,0 +1,61 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.servicenow; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.apache.camel.CamelContext; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +class ServiceNowTestSupport extends CamelTestSupport { + + protected static final Logger LOGGER = LoggerFactory.getLogger(ServiceNowTestSupport.class); + + @Override + protected CamelContext createCamelContext() throws Exception { + return super.createCamelContext(); + } + + protected static class KVBuilder { + private final Map<String, Object> headers; + + public KVBuilder() { + this(new HashMap<String, Object>()); + } + + private KVBuilder(Map<String, Object> headers) { + this.headers = headers; + } + + public KVBuilder on(Map<String, Object> headers) { + return new KVBuilder(headers); + } + + public KVBuilder put(String key, Object val) { + headers.put(key, val); + return this; + } + + public Map<String, Object> build() { + return Collections.unmodifiableMap(this.headers); + } + } +} http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/model/Incident.java ---------------------------------------------------------------------- diff --git a/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/model/Incident.java b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/model/Incident.java new file mode 100644 index 0000000..54c8904 --- /dev/null +++ b/components/camel-servicenow/src/test/java/org/apache/camel/component/servicenow/model/Incident.java @@ -0,0 +1,96 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.servicenow.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Incident { + @JsonProperty("sys_id") + private String id; + + @JsonProperty("number") + private String number; + + @JsonProperty("description") + private String description; + + @JsonProperty("short_description") + private String shortDescription; + + @JsonProperty("severity") + private int severity; + + @JsonProperty("impact") + private int impact; + + + public Incident() { + } + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getShortDescription() { + return shortDescription; + } + + public void setShortDescription(String shortDescription) { + this.shortDescription = shortDescription; + } + + public int getSeverity() { + return severity; + } + + public void setSeverity(int severity) { + this.severity = severity; + } + + public int getImpact() { + return impact; + } + + public void setImpact(int impact) { + this.impact = impact; + } +} http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/components/camel-servicenow/src/test/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/components/camel-servicenow/src/test/resources/log4j.properties b/components/camel-servicenow/src/test/resources/log4j.properties new file mode 100644 index 0000000..74c76b7 --- /dev/null +++ b/components/camel-servicenow/src/test/resources/log4j.properties @@ -0,0 +1,19 @@ +# +# The logging properties used +# +log4j.rootLogger=INFO, file + +# uncomment the following line to turn on Camel debugging +log4j.logger.org.apache.camel.component.servicenow=DEBUG + +# CONSOLE appender not used by default +log4j.appender.out=org.apache.log4j.ConsoleAppender +log4j.appender.out.layout=org.apache.log4j.PatternLayout +log4j.appender.out.layout.ConversionPattern=%d{HH:mm:ss.SSS} [%-15.15t] %-30.30c{1} %-5p %m%n +#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n + +# File appender +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d %-5p %c{1} - %m %n +log4j.appender.file.file=target/camel-servicenow-test.log http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/components/pom.xml ---------------------------------------------------------------------- diff --git a/components/pom.xml b/components/pom.xml index c55d74f..22366b2 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -211,6 +211,7 @@ <module>camel-schematron</module> <module>camel-scr</module> <module>camel-script</module> + <module>camel-servicenow</module> <module>camel-servlet</module> <module>camel-servletlistener</module> <module>camel-shiro</module> http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index 4e6e388..b38a7bf 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -1509,6 +1509,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-servicenow</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-servlet</artifactId> <version>${project.version}</version> </dependency> http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/platforms/karaf/features/src/main/resources/features.xml ---------------------------------------------------------------------- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index ac7ab20..8eebef6 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -1379,6 +1379,18 @@ <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.rhino/${rhino-bundle-version}</bundle> <bundle>mvn:org.apache.camel/camel-script/${project.version}</bundle> </feature> + <feature name='camel-servicenow' version='${project.version}' resolver='(obr)' start-level='50'> + <feature version='${project.version}'>camel-core</feature> + <feature version='${cxf-version-range}'>cxf-core</feature> + <feature version='${cxf-version-range}'>cxf-jaxrs</feature> + <feature version='${cxf-version-range}'>cxf-rs-security-oauth2</feature> + <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-core/${jackson2-version}</bundle> + <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2-version}</bundle> + <bundle dependency='true'>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2-version}</bundle> + <bundle dependency='true'>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson2-version}</bundle> + <bundle dependency='true'>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson2-version}</bundle> + <bundle>mvn:org.apache.camel/camel-servicenow/${project.version}</bundle> + </feature> <feature name='camel-servlet' version='${project.version}' resolver='(obr)' start-level='50'> <feature version='${project.version}'>camel-core</feature> <feature>http</feature> http://git-wip-us.apache.org/repos/asf/camel/blob/aa7ca432/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelServicenowTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelServicenowTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelServicenowTest.java new file mode 100644 index 0000000..f275161 --- /dev/null +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelServicenowTest.java @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.itest.karaf; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +public class CamelServicenowTest extends AbstractFeatureTest { + + public static final String COMPONENT = extractName(CamelServicenowTest.class); + + @Test + public void test() throws Exception { + testComponent(COMPONENT); + } + + @Configuration + public static Option[] configure() { + return configure(COMPONENT); + } + +} \ No newline at end of file