From b6b7bef8bdcad15af01ac88a038dd763ce59f68f Mon Sep 17 00:00:00 2001 From: xg353y Date: Tue, 11 Apr 2017 13:30:42 +0200 Subject: [MSO-8] Update the maven dependency Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes. Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc Signed-off-by: xg353y --- bpmn/MSOURN-plugin/pom.xml | 21 +- .../camunda/bpm/plugin/urnmap/URNMapPlugin.java | 54 --- .../urnmap/db/MyBatisExtendedSessionFactory.java | 89 ----- .../urnmap/db/MyBatisQueryCommandExecutor.java | 44 --- .../att/camunda/bpm/plugin/urnmap/db/URNData.java | 47 --- .../camunda/bpm/plugin/urnmap/db/URNService.java | 48 --- .../urnmap/resources/ProcessInstanceResource.java | 98 ----- .../urnmap/resources/URNMapPluginRootResource.java | 43 --- .../bpm/plugin/urnmap/resources/URNResource.java | 205 ----------- .../camunda/bpmn/plugin/urnmap/URNMapPlugin.java | 53 +++ .../urnmap/db/MyBatisExtendedSessionFactory.java | 89 +++++ .../urnmap/db/MyBatisQueryCommandExecutor.java | 44 +++ .../camunda/bpmn/plugin/urnmap/db/URNData.java | 47 +++ .../camunda/bpmn/plugin/urnmap/db/URNService.java | 48 +++ .../urnmap/resources/ProcessInstanceResource.java | 96 +++++ .../urnmap/resources/URNMapPluginRootResource.java | 42 +++ .../bpmn/plugin/urnmap/resources/URNResource.java | 205 +++++++++++ ...rg.camunda.bpm.cockpit.plugin.spi.CockpitPlugin | 2 +- .../camunda/bpm/plugin/urnmap/queries/urnMap.xml | 64 ---- bpmn/MSOURN-plugin/src/main/resources/mappings.xml | 2 +- .../camunda/bpm/plugin/urnmap/queries/urnMap.xml | 64 ++++ .../bpm/plugin/urnmap/URNMapPluginESTest.java | 40 --- .../urnmap/URNMapPluginESTestscaffolding.java | 91 ----- .../bpm/plugin/urnmap/db/URNDataESTest.java | 86 ----- .../plugin/urnmap/db/URNDataESTestscaffolding.java | 78 ---- .../bpm/plugin/urnmap/db/URNServiceESTest.java | 34 -- .../urnmap/db/URNServiceESTestscaffolding.java | 97 ----- .../resources/ProcessInstanceResourceESTest.java | 85 ----- .../ProcessInstanceResourceESTestscaffolding.java | 94 ----- .../resources/URNMapPluginRootResourceESTest.java | 38 -- .../URNMapPluginRootResourceESTestscaffolding.java | 119 ------ .../plugin/urnmap/resources/URNResourceESTest.java | 162 --------- .../resources/URNResourceESTestscaffolding.java | 400 --------------------- .../bpmn/plugin/urnmap/URNMapPluginESTest.java | 43 +++ .../urnmap/URNMapPluginESTestscaffolding.java | 91 +++++ .../bpmn/plugin/urnmap/db/URNDataESTest.java | 88 +++++ .../plugin/urnmap/db/URNDataESTestscaffolding.java | 78 ++++ .../bpmn/plugin/urnmap/db/URNServiceESTest.java | 36 ++ .../urnmap/db/URNServiceESTestscaffolding.java | 97 +++++ .../resources/ProcessInstanceResourceESTest.java | 88 +++++ .../ProcessInstanceResourceESTestscaffolding.java | 94 +++++ .../resources/URNMapPluginRootResourceESTest.java | 42 +++ .../URNMapPluginRootResourceESTestscaffolding.java | 119 ++++++ .../plugin/urnmap/resources/URNResourceESTest.java | 165 +++++++++ .../resources/URNResourceESTestscaffolding.java | 400 +++++++++++++++++++++ 45 files changed, 2041 insertions(+), 2029 deletions(-) delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java delete mode 100644 bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java create mode 100644 bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java delete mode 100644 bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml create mode 100644 bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java delete mode 100644 bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java create mode 100644 bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java (limited to 'bpmn/MSOURN-plugin') diff --git a/bpmn/MSOURN-plugin/pom.xml b/bpmn/MSOURN-plugin/pom.xml index 5ad57a6096..6022f4865b 100644 --- a/bpmn/MSOURN-plugin/pom.xml +++ b/bpmn/MSOURN-plugin/pom.xml @@ -16,12 +16,11 @@ MSO URN Mapping Cockpit Plugin - - org.camunda.bpm.webapp - camunda-webapp-core - ${camunda.version} - + org.camunda.bpm.webapp + camunda-webapp + classes + ${camunda.version} commons-fileupload @@ -29,7 +28,6 @@ - commons-fileupload commons-fileupload @@ -51,11 +49,6 @@ h2 test - - junit - junit - test - javax.servlet javax.servlet-api @@ -68,5 +61,11 @@ ${project.version} compile + + org.evosuite + evosuite-standalone-runtime + ${evosuiteVersion} + test + \ No newline at end of file diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java deleted file mode 100644 index 9a02aa0c38..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/URNMapPlugin.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin; - -import com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource; - - - -public class URNMapPlugin extends AbstractCockpitPlugin{ - public static final String ID = "urnMap-plugin"; - - public String getId() { - return ID; - } - - @Override - public Set> getResourceClasses() { - Set> classes = new HashSet>(); - - classes.add(URNMapPluginRootResource.class); - - return classes; - } - - @Override - public List getMappingFiles() { - return Arrays.asList("com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml"); - } -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java deleted file mode 100644 index 8a9d136dd6..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisExtendedSessionFactory.java +++ /dev/null @@ -1,89 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import org.camunda.bpm.engine.ProcessEngineConfiguration; -import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; -import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration; -import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor; -import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; -import org.camunda.bpm.engine.impl.interceptor.LogInterceptor; -import org.camunda.bpm.engine.impl.util.ReflectUtil; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfiguration { - - private String resourceName; - - protected void init() { - throw new IllegalArgumentException( - "Normal 'init' on process engine only used for extended MyBatis mappings is not allowed, please use 'initFromProcessEngineConfiguration'. You cannot construct a process engine with this configuration."); - } - - /** - * initialize the {@link ProcessEngineConfiguration} from an existing one, - * just using the database settings and initialize the database / MyBatis - * stuff. - */ - public void initFromProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration, String resourceName) { - this.resourceName = resourceName; - - setDatabaseType(processEngineConfiguration.getDatabaseType()); - setDataSource(processEngineConfiguration.getDataSource()); - setDatabaseTablePrefix(processEngineConfiguration.getDatabaseTablePrefix()); - - initDataSource(); - //initVariableTypes(); - initCommandContextFactory(); - initTransactionFactory(); - initTransactionContextFactory(); - initCommandExecutors(); - initSqlSessionFactory(); - initIncidentHandlers(); - initIdentityProviderSessionFactory(); - initSessionFactories(); - } - - /** - * In order to always open a new command context set the property - * "alwaysOpenNew" to true inside the CommandContextInterceptor. - * - * If you execute the custom queries inside the process engine - * (for example in a service task), you have to do this. - */ - @Override - protected Collection getDefaultCommandInterceptorsTxRequired() { - List defaultCommandInterceptorsTxRequired = new ArrayList(); - defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); - defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true)); - return defaultCommandInterceptorsTxRequired; - } - - @Override - protected InputStream getMyBatisXmlConfigurationSteam() { - return ReflectUtil.getResourceAsStream(resourceName); - } - -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java deleted file mode 100644 index 0bd7d739c5..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/MyBatisQueryCommandExecutor.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; -import org.camunda.bpm.engine.impl.interceptor.Command; - -/** - * Helper to initialize a minimized process engine which does all the transaction and MyBatis mapping stuff for us - * and can be used to execute queries. - */ -public class MyBatisQueryCommandExecutor { - - private MyBatisExtendedSessionFactory myBatisExtendedSessionFactory; - - public MyBatisQueryCommandExecutor(ProcessEngineConfigurationImpl processEngineConfiguration, String mappingResourceName) { - myBatisExtendedSessionFactory = new MyBatisExtendedSessionFactory(); - myBatisExtendedSessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, mappingResourceName); - } - - public T executeQueryCommand(Command command) { - return myBatisExtendedSessionFactory.getCommandExecutorTxRequired().execute(command); - } - - -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java deleted file mode 100644 index f8396bb223..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNData.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -public class URNData { - - private String URNName; - private String URNValue; - private String Ver_; - public String getURNName() { - return URNName; - } - public void setURNName(String uRNName) { - URNName = uRNName; - } - public String getURNValue() { - return URNValue; - } - public void setURNValue(String uRNValue) { - URNValue = uRNValue; - } - public String getVer_() { - return Ver_; - } - public void setVer_(String ver_) { - Ver_ = ver_; - } - -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java deleted file mode 100644 index 7fd41c131d..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/db/URNService.java +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import java.util.List; - -import org.camunda.bpm.engine.ProcessEngines; -import org.camunda.bpm.engine.impl.ProcessEngineImpl; -import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; -import org.camunda.bpm.engine.impl.interceptor.Command; -import org.camunda.bpm.engine.impl.interceptor.CommandContext; - -public class URNService { - - - public List getProperties() { - ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine(); - ProcessEngineConfigurationImpl processEngineConfiguration = processEngine.getProcessEngineConfiguration(); - - MyBatisQueryCommandExecutor commandExecutor = new MyBatisQueryCommandExecutor(processEngineConfiguration, "mappings.xml"); - return commandExecutor.executeQueryCommand(new Command>() { - - @SuppressWarnings("unchecked") - public List execute(CommandContext commandContext) { - return (List) commandContext.getDbSqlSession().selectList("retrieveUrnKeyValuePair", null); - } - }); - } - -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java deleted file mode 100644 index 44fe47b053..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResource.java +++ /dev/null @@ -1,98 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import java.util.List; -import java.util.StringTokenizer; - -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; - -import org.camunda.bpm.cockpit.db.QueryParameters; -import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource; -import com.att.camunda.bpm.plugin.urnmap.db.*; -import org.camunda.bpm.cockpit.db.CommandExecutor; - -import com.att.camunda.bpm.plugin.urnmap.db.URNData; - -public class ProcessInstanceResource extends AbstractPluginResource { - - public ProcessInstanceResource(String engineName) { - super(engineName); - } - - @GET - public List getUrnDataMap() { - List list = getQueryService() - .executeQuery( - "cockpit.urnMap.retrieveUrnKeyValuePair", - new QueryParameters()); - - System.out.println("urnmap-plugin project - Results Retrieved: "); - System.out.println("URNName: " + " " + "URNValue: " ); - for(URNData d: list) - { - System.out.println( d.getURNName() + " " + d.getURNValue()); - } - - return list; - } - - @PUT - //public void insertNewRow(String key_, String value_) - public void insertNewRow(String temp) - { - System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp); - StringTokenizer st = new StringTokenizer(temp, "|"); - String key_ = ""; - String value_ = ""; - - while(st.hasMoreTokens()) { - key_ = st.nextToken(); - value_ = st.nextToken(); - System.out.println(key_ + "\t" + value_); - } - - System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_); - URNData nRow = new URNData(); - nRow.setVer_("1"); - nRow.setURNName(key_); - nRow.setURNValue(value_); - - getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class); - - System.out.println("AddNewRow: XXXXXX END XXXXXXXXXXX"); - } - - @POST - // public void getPersistData(List myList) { - public void getPersistData(URNData d) { - - System.out.println("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() ); - - getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class); - //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class); - - - System.out.println("XXXXXXXXXX - END - XXXXXXXXXXXXXXX"); - } -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java deleted file mode 100644 index c30eb8d8d7..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResource.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; - -import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource; - -import com.att.camunda.bpm.plugin.urnmap.URNMapPlugin; - -@SuppressWarnings("deprecation") -@Path("plugin/" + URNMapPlugin.ID) -public class URNMapPluginRootResource extends AbstractPluginRootResource -{ - public URNMapPluginRootResource() { - super(URNMapPlugin.ID); - //super(""); - } - - @Path("{engineName}/process-instance") - public URNResource getProcessInstanceResource(@PathParam("engineName") String engineName) { - return subResource(new URNResource(engineName), engineName); - } -} diff --git a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java b/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java deleted file mode 100644 index 08724db415..0000000000 --- a/bpmn/MSOURN-plugin/src/main/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResource.java +++ /dev/null @@ -1,205 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * OPENECOMP - MSO - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; -/*** -import java.beans.Statement; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; -*/ -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.ArrayList; -import java.util.List; -import java.util.StringTokenizer; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.sql.DataSource; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; - -import org.camunda.bpm.cockpit.db.QueryParameters; -import org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource; - - -//import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource; -import com.att.camunda.bpm.plugin.urnmap.db.URNData; -import org.openecomp.mso.logger.MsoLogger; - - -//public class ProcessInstanceResource extends AbstractPluginResource { -public class URNResource extends AbstractCockpitPluginResource{ - public URNResource(String engineName) { - super(engineName); - } - - private Connection conn; - private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL); - @GET - public List getUrnDataMap() - { - List list = new ArrayList(); - - try { - - conn = getDBConnection(); - PreparedStatement psData = conn - .prepareStatement("select * from ATT_URN_MAPPING order by NAME_"); - - ResultSet r = psData.executeQuery(); - - while(r.next()) - { - URNData d = new URNData(); - d.setURNName(r.getString("NAME_")); - d.setURNValue(r.getString("VALUE_")); - d.setVer_( r.getString("REV_")); - - list.add(d); - } - - psData.close(); - conn.close(); - - } catch (Exception e) - { - - e.printStackTrace(); - } - - for(URNData d: list) - { - msoLogger.debug( d.getURNName() + " " + d.getURNValue()); - //msoLogger.debug("Started Executing " + getTaskName()); - msoLogger.debug("Started Executing " + d.getURNName() + " " + d.getURNValue()); - } - - return list; - } - - public List getUrnDataMapOLD() - { - - List list = getQueryService() - .executeQuery("cockpit.urnMap.retrieveUrnKeyValuePair", new QueryParameters()); - - msoLogger.debug("urnmap-plugin project - Results Retrieved: "); - msoLogger.debug("URNName: " + " " + "URNValue: " ); - - for(URNData d: list) - { - //msoLogger.debug( d.getURNName() + " " + d.getURNValue()); - msoLogger.debug( d.getURNName() + " " + d.getURNValue()); - } - - return list; - } - - public Connection getDBConnection() - { - try { - - if(conn == null) - { - Context ctx = new InitialContext(); - DataSource ds = (DataSource)ctx.lookup("java:jboss/datasources/ProcessEngine");//jboss - conn = ds.getConnection(); - - } - - } catch (Exception e) - { - - e.printStackTrace(); - } - - return conn; - } - - @PUT - public void insertNewRow(String temp) - { - msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp); - msoLogger.debug("AddNewRow: EngineName ---> " + engineName); - - StringTokenizer st = new StringTokenizer(temp, "|"); - String key_ = ""; - String value_ = ""; - - while(st.hasMoreTokens()) { - key_ = st.nextToken(); - value_ = st.nextToken(); - msoLogger.debug(key_ + "\t" + value_); - } - - msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_); - final URNData nRow = new URNData(); - nRow.setVer_("1"); - final String myKey = key_; - final String myValue = value_; - - msoLogger.debug("----------- START ----------------------"); - try { - - conn = getDBConnection(); - PreparedStatement psData = conn - .prepareStatement("Insert into ATT_URN_MAPPING values ('" + key_ + "', '" + value_ + "', '1')"); - - psData.executeUpdate(); - - psData.close(); - conn.close(); - //} - - } catch (Exception e) - { - - e.printStackTrace(); - } - // getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class); - } - - @POST - public void getPersistData(URNData d) { - - //getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class); - - try { - - conn = getDBConnection(); - PreparedStatement psData = conn - .prepareStatement("UPDATE ATT_URN_MAPPING set VALUE_ ='"+ d.getURNValue() + "' WHERE NAME_='" + d.getURNName() + "'"); - - psData.executeUpdate(); - - psData.close(); - conn.close(); - } catch (Exception e) - { - - e.printStackTrace(); - } - - } -} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java new file mode 100644 index 0000000000..fc08d2d54e --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPlugin.java @@ -0,0 +1,53 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin; +import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource; + + + +public class URNMapPlugin extends AbstractCockpitPlugin{ + public static final String ID = "urnMap-plugin"; + + public String getId() { + return ID; + } + + @Override + public Set> getResourceClasses() { + Set> classes = new HashSet>(); + + classes.add(URNMapPluginRootResource.class); + + return classes; + } + + @Override + public List getMappingFiles() { + return Arrays.asList("org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml"); + } +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java new file mode 100644 index 0000000000..728042008d --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisExtendedSessionFactory.java @@ -0,0 +1,89 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import org.camunda.bpm.engine.ProcessEngineConfiguration; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration; +import org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor; +import org.camunda.bpm.engine.impl.interceptor.CommandInterceptor; +import org.camunda.bpm.engine.impl.interceptor.LogInterceptor; +import org.camunda.bpm.engine.impl.util.ReflectUtil; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfiguration { + + private String resourceName; + + protected void init() { + throw new IllegalArgumentException( + "Normal 'init' on process engine only used for extended MyBatis mappings is not allowed, please use 'initFromProcessEngineConfiguration'. You cannot construct a process engine with this configuration."); + } + + /** + * initialize the {@link ProcessEngineConfiguration} from an existing one, + * just using the database settings and initialize the database / MyBatis + * stuff. + */ + public void initFromProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration, String resourceName) { + this.resourceName = resourceName; + + setDatabaseType(processEngineConfiguration.getDatabaseType()); + setDataSource(processEngineConfiguration.getDataSource()); + setDatabaseTablePrefix(processEngineConfiguration.getDatabaseTablePrefix()); + + initDataSource(); + //initVariableTypes(); + initCommandContextFactory(); + initTransactionFactory(); + initTransactionContextFactory(); + initCommandExecutors(); + initSqlSessionFactory(); + initIncidentHandlers(); + initIdentityProviderSessionFactory(); + initSessionFactories(); + } + + /** + * In order to always open a new command context set the property + * "alwaysOpenNew" to true inside the CommandContextInterceptor. + * + * If you execute the custom queries inside the process engine + * (for example in a service task), you have to do this. + */ + @Override + protected Collection getDefaultCommandInterceptorsTxRequired() { + List defaultCommandInterceptorsTxRequired = new ArrayList(); + defaultCommandInterceptorsTxRequired.add(new LogInterceptor()); + defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(commandContextFactory, this, true)); + return defaultCommandInterceptorsTxRequired; + } + + @Override + protected InputStream getMyBatisXmlConfigurationSteam() { + return ReflectUtil.getResourceAsStream(resourceName); + } + +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java new file mode 100644 index 0000000000..e7140cd318 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/MyBatisQueryCommandExecutor.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.interceptor.Command; + +/** + * Helper to initialize a minimized process engine which does all the transaction and MyBatis mapping stuff for us + * and can be used to execute queries. + */ +public class MyBatisQueryCommandExecutor { + + private MyBatisExtendedSessionFactory myBatisExtendedSessionFactory; + + public MyBatisQueryCommandExecutor(ProcessEngineConfigurationImpl processEngineConfiguration, String mappingResourceName) { + myBatisExtendedSessionFactory = new MyBatisExtendedSessionFactory(); + myBatisExtendedSessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration, mappingResourceName); + } + + public T executeQueryCommand(Command command) { + return myBatisExtendedSessionFactory.getCommandExecutorTxRequired().execute(command); + } + + +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java new file mode 100644 index 0000000000..ac8b2e15ee --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNData.java @@ -0,0 +1,47 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +public class URNData { + + private String URNName; + private String URNValue; + private String Ver_; + public String getURNName() { + return URNName; + } + public void setURNName(String uRNName) { + URNName = uRNName; + } + public String getURNValue() { + return URNValue; + } + public void setURNValue(String uRNValue) { + URNValue = uRNValue; + } + public String getVer_() { + return Ver_; + } + public void setVer_(String ver_) { + Ver_ = ver_; + } + +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java new file mode 100644 index 0000000000..3838343aba --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNService.java @@ -0,0 +1,48 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import java.util.List; + +import org.camunda.bpm.engine.ProcessEngines; +import org.camunda.bpm.engine.impl.ProcessEngineImpl; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; +import org.camunda.bpm.engine.impl.interceptor.Command; +import org.camunda.bpm.engine.impl.interceptor.CommandContext; + +public class URNService { + + + public List getProperties() { + ProcessEngineImpl processEngine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine(); + ProcessEngineConfigurationImpl processEngineConfiguration = processEngine.getProcessEngineConfiguration(); + + MyBatisQueryCommandExecutor commandExecutor = new MyBatisQueryCommandExecutor(processEngineConfiguration, "mappings.xml"); + return commandExecutor.executeQueryCommand(new Command>() { + + @SuppressWarnings("unchecked") + public List execute(CommandContext commandContext) { + return (List) commandContext.getDbSqlSession().selectList("retrieveUrnKeyValuePair", null); + } + }); + } + +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java new file mode 100644 index 0000000000..4a155809e5 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java @@ -0,0 +1,96 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import java.util.List; +import java.util.StringTokenizer; + +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; + +import org.camunda.bpm.cockpit.db.QueryParameters; +import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource; +import org.camunda.bpm.cockpit.db.CommandExecutor; +import org.openecomp.camunda.bpmn.plugin.urnmap.db.*; + +public class ProcessInstanceResource extends AbstractPluginResource { + + public ProcessInstanceResource(String engineName) { + super(engineName); + } + + @GET + public List getUrnDataMap() { + List list = getQueryService() + .executeQuery( + "cockpit.urnMap.retrieveUrnKeyValuePair", + new QueryParameters()); + + System.out.println("urnmap-plugin project - Results Retrieved: "); + System.out.println("URNName: " + " " + "URNValue: " ); + for(URNData d: list) + { + System.out.println( d.getURNName() + " " + d.getURNValue()); + } + + return list; + } + + @PUT + //public void insertNewRow(String key_, String value_) + public void insertNewRow(String temp) + { + System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp); + StringTokenizer st = new StringTokenizer(temp, "|"); + String key_ = ""; + String value_ = ""; + + while(st.hasMoreTokens()) { + key_ = st.nextToken(); + value_ = st.nextToken(); + System.out.println(key_ + "\t" + value_); + } + + System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_); + URNData nRow = new URNData(); + nRow.setVer_("1"); + nRow.setURNName(key_); + nRow.setURNValue(value_); + + getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class); + + System.out.println("AddNewRow: XXXXXX END XXXXXXXXXXX"); + } + + @POST + // public void getPersistData(List myList) { + public void getPersistData(URNData d) { + + System.out.println("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() ); + + getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class); + //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class); + + + System.out.println("XXXXXXXXXX - END - XXXXXXXXXXXXXXX"); + } +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java new file mode 100644 index 0000000000..d31fec66b9 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResource.java @@ -0,0 +1,42 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; + +import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource; +import org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin; + +@SuppressWarnings("deprecation") +@Path("plugin/" + URNMapPlugin.ID) +public class URNMapPluginRootResource extends AbstractPluginRootResource +{ + public URNMapPluginRootResource() { + super(URNMapPlugin.ID); + //super(""); + } + + @Path("{engineName}/process-instance") + public URNResource getProcessInstanceResource(@PathParam("engineName") String engineName) { + return subResource(new URNResource(engineName), engineName); + } +} diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java new file mode 100644 index 0000000000..5838130a92 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResource.java @@ -0,0 +1,205 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - MSO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; +/*** +import java.beans.Statement; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +*/ +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.sql.DataSource; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; + +import org.camunda.bpm.cockpit.db.QueryParameters; +import org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource; + + +//import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource; +import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData; +import org.openecomp.mso.logger.MsoLogger; + + +//public class ProcessInstanceResource extends AbstractPluginResource { +public class URNResource extends AbstractCockpitPluginResource{ + public URNResource(String engineName) { + super(engineName); + } + + private Connection conn; + private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL); + @GET + public List getUrnDataMap() + { + List list = new ArrayList(); + + try { + + conn = getDBConnection(); + PreparedStatement psData = conn + .prepareStatement("select * from MSO_URN_MAPPING order by NAME_"); + + ResultSet r = psData.executeQuery(); + + while(r.next()) + { + URNData d = new URNData(); + d.setURNName(r.getString("NAME_")); + d.setURNValue(r.getString("VALUE_")); + d.setVer_( r.getString("REV_")); + + list.add(d); + } + + psData.close(); + conn.close(); + + } catch (Exception e) + { + + e.printStackTrace(); + } + + for(URNData d: list) + { + msoLogger.debug( d.getURNName() + " " + d.getURNValue()); + //msoLogger.debug("Started Executing " + getTaskName()); + msoLogger.debug("Started Executing " + d.getURNName() + " " + d.getURNValue()); + } + + return list; + } + + public List getUrnDataMapOLD() + { + + List list = getQueryService() + .executeQuery("cockpit.urnMap.retrieveUrnKeyValuePair", new QueryParameters()); + + msoLogger.debug("urnmap-plugin project - Results Retrieved: "); + msoLogger.debug("URNName: " + " " + "URNValue: " ); + + for(URNData d: list) + { + //msoLogger.debug( d.getURNName() + " " + d.getURNValue()); + msoLogger.debug( d.getURNName() + " " + d.getURNValue()); + } + + return list; + } + + public Connection getDBConnection() + { + try { + + if(conn == null) + { + Context ctx = new InitialContext(); + DataSource ds = (DataSource)ctx.lookup("java:jboss/datasources/ProcessEngine");//jboss + conn = ds.getConnection(); + + } + + } catch (Exception e) + { + + e.printStackTrace(); + } + + return conn; + } + + @PUT + public void insertNewRow(String temp) + { + msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp); + msoLogger.debug("AddNewRow: EngineName ---> " + engineName); + + StringTokenizer st = new StringTokenizer(temp, "|"); + String key_ = ""; + String value_ = ""; + + while(st.hasMoreTokens()) { + key_ = st.nextToken(); + value_ = st.nextToken(); + msoLogger.debug(key_ + "\t" + value_); + } + + msoLogger.debug("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_); + final URNData nRow = new URNData(); + nRow.setVer_("1"); + final String myKey = key_; + final String myValue = value_; + + msoLogger.debug("----------- START ----------------------"); + try { + + conn = getDBConnection(); + PreparedStatement psData = conn + .prepareStatement("Insert into MSO_URN_MAPPING values ('" + key_ + "', '" + value_ + "', '1')"); + + psData.executeUpdate(); + + psData.close(); + conn.close(); + //} + + } catch (Exception e) + { + + e.printStackTrace(); + } + // getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class); + } + + @POST + public void getPersistData(URNData d) { + + //getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class); + + try { + + conn = getDBConnection(); + PreparedStatement psData = conn + .prepareStatement("UPDATE MSO_URN_MAPPING set VALUE_ ='"+ d.getURNValue() + "' WHERE NAME_='" + d.getURNName() + "'"); + + psData.executeUpdate(); + + psData.close(); + conn.close(); + } catch (Exception e) + { + + e.printStackTrace(); + } + + } +} diff --git a/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin b/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin index 1e207d8022..9a5055af22 100644 --- a/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin +++ b/bpmn/MSOURN-plugin/src/main/resources/META-INF/services/org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin @@ -1 +1 @@ -com.att.camunda.bpm.plugin.urnmap.URNMapPlugin \ No newline at end of file +org.openecomp.camunda.bpm.plugin.urnmap.URNMapPlugin \ No newline at end of file diff --git a/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml b/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml deleted file mode 100644 index ed610305ac..0000000000 --- a/bpmn/MSOURN-plugin/src/main/resources/com/att/camunda/bpm/plugin/urnmap/queries/urnMap.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - insert into ATT_URN_MAPPING (NAME_, VALUE_, REV_) - values ( - #{URNName}, #{URNValue}, 1 - ) - - - - - - - - - - - update ATT_URN_MAPPING set - NAME_ = #{URNName}, - VALUE_ = #{URNValue}, - REV_ = 1 - where NAME_=#{URNName} - - diff --git a/bpmn/MSOURN-plugin/src/main/resources/mappings.xml b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml index d0a9177b7e..3141dfee4c 100644 --- a/bpmn/MSOURN-plugin/src/main/resources/mappings.xml +++ b/bpmn/MSOURN-plugin/src/main/resources/mappings.xml @@ -27,6 +27,6 @@ - + diff --git a/bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml b/bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml new file mode 100644 index 0000000000..d0b58618e4 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/main/resources/org/openecomp/camunda/bpm/plugin/urnmap/queries/urnMap.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + insert into MSO_URN_MAPPING (NAME_, VALUE_, REV_) + values ( + #{URNName}, #{URNValue}, 1 + ) + + + + + + + + + + + update MSO_URN_MAPPING set + NAME_ = #{URNName}, + VALUE_ = #{URNValue}, + REV_ = 1 + where NAME_=#{URNName} + + diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java deleted file mode 100644 index 0377b444be..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 13:49:02 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap; - -import org.junit.Test; -import static org.junit.Assert.*; - -import java.util.List; -import java.util.Set; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class URNMapPluginESTest extends URNMapPluginESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - URNMapPlugin uRNMapPlugin0 = new URNMapPlugin(); - Set> set0 = uRNMapPlugin0.getResourceClasses(); - assertFalse(set0.isEmpty()); - } - - @Test(timeout = 4000) - public void test1() throws Throwable { - URNMapPlugin uRNMapPlugin0 = new URNMapPlugin(); - String string0 = uRNMapPlugin0.getId(); - assertEquals("urnMap-plugin", string0); - } - - @Test(timeout = 4000) - public void test2() throws Throwable { - URNMapPlugin uRNMapPlugin0 = new URNMapPlugin(); - List list0 = uRNMapPlugin0.getMappingFiles(); - assertEquals(1, list0.size()); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java deleted file mode 100644 index 472a2bc7e3..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/URNMapPluginESTestscaffolding.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 13:49:02 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class URNMapPluginESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginESTestscaffolding.class.getClassLoader() , - "org.camunda.bpm.webapp.plugin.spi.impl.AbstractAppPlugin", - "org.camunda.bpm.webapp.plugin.spi.AppPlugin", - "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource", - "org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin", - "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource", - "org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin", - "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource", - "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource", - "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "com.att.camunda.bpm.plugin.urnmap.URNMapPlugin" - ); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java deleted file mode 100644 index c7b241c2d5..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 13:48:50 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import org.junit.Test; -import static org.junit.Assert.*; - -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class URNDataESTest extends URNDataESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - URNData uRNData0 = new URNData(); - uRNData0.setVer_("yE)"); - String string0 = uRNData0.getVer_(); - assertEquals("yE)", string0); - } - - @Test(timeout = 4000) - public void test1() throws Throwable { - URNData uRNData0 = new URNData(); - uRNData0.setURNValue("Dw]M@,~.D"); - String string0 = uRNData0.getURNValue(); - assertEquals("Dw]M@,~.D", string0); - } - - @Test(timeout = 4000) - public void test2() throws Throwable { - URNData uRNData0 = new URNData(); - uRNData0.setURNName(""); - String string0 = uRNData0.getURNName(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test3() throws Throwable { - URNData uRNData0 = new URNData(); - String string0 = uRNData0.getVer_(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test4() throws Throwable { - URNData uRNData0 = new URNData(); - String string0 = uRNData0.getURNValue(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test5() throws Throwable { - URNData uRNData0 = new URNData(); - String string0 = uRNData0.getURNName(); - assertNull(string0); - } - - @Test(timeout = 4000) - public void test6() throws Throwable { - URNData uRNData0 = new URNData(); - uRNData0.setURNValue(""); - String string0 = uRNData0.getURNValue(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test7() throws Throwable { - URNData uRNData0 = new URNData(); - uRNData0.setVer_(""); - String string0 = uRNData0.getVer_(); - assertEquals("", string0); - } - - @Test(timeout = 4000) - public void test8() throws Throwable { - URNData uRNData0 = new URNData(); - uRNData0.setURNName("2Gv9h[mmV=,z\"VSY`t)"); - String string0 = uRNData0.getURNName(); - assertEquals("2Gv9h[mmV=,z\"VSY`t)", string0); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java deleted file mode 100644 index 7ae4fabb38..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNDataESTestscaffolding.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 13:48:50 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class URNDataESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.db.URNData"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNDataESTestscaffolding.class.getClassLoader() , - "com.att.camunda.bpm.plugin.urnmap.db.URNData" - ); - } - - private static void resetClasses() { - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java deleted file mode 100644 index 9c71cdebf3..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 13:47:07 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.runtime.EvoAssertions.*; - -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class URNServiceESTest extends URNServiceESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - URNService uRNService0 = new URNService(); - // Undeclared exception! - try { - uRNService0.getProperties(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("com.att.camunda.bpm.plugin.urnmap.db.URNService", e); - } - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java deleted file mode 100644 index d6ce3f31b4..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/db/URNServiceESTestscaffolding.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 13:47:07 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.db; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class URNServiceESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.db.URNService"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNServiceESTestscaffolding.class.getClassLoader() , - "org.camunda.bpm.engine.ProcessEngineException", - "com.att.camunda.bpm.plugin.urnmap.db.URNService", - "org.camunda.bpm.engine.impl.interceptor.Command", - "org.camunda.bpm.engine.ClassLoadingException", - "org.camunda.bpm.engine.ProcessEngine", - "org.camunda.bpm.engine.ProcessEngines", - "org.camunda.bpm.engine.ProcessEngineInfo", - "org.camunda.bpm.application.ProcessApplicationUnavailableException", - "org.camunda.bpm.engine.impl.ProcessEngineImpl", - "org.camunda.bpm.engine.impl.context.Context", - "org.camunda.bpm.engine.impl.util.ReflectUtil", - "org.camunda.bpm.engine.ProcessEngineServices", - "com.att.camunda.bpm.plugin.urnmap.db.URNData" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.camunda.bpm.engine.impl.context.Context", - "org.camunda.bpm.engine.ProcessEngines", - "org.camunda.bpm.engine.impl.util.ReflectUtil" - ); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java deleted file mode 100644 index 56d7283026..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 13:45:16 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.runtime.EvoAssertions.*; -import com.att.camunda.bpm.plugin.urnmap.db.URNData; - -import java.util.NoSuchElementException; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class ProcessInstanceResourceESTest extends ProcessInstanceResourceESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource((String) null); - // Undeclared exception! - try { - processInstanceResource0.getUrnDataMap(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.camunda.bpm.cockpit.Cockpit", e); - } - } - - @Test(timeout = 4000) - public void test1() throws Throwable { - ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("DEUtDF$-rb|D]l9"); - // Undeclared exception! - try { - processInstanceResource0.insertNewRow("DEUtDF$-rb|D]l9"); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.camunda.bpm.cockpit.Cockpit", e); - } - } - - @Test(timeout = 4000) - public void test2() throws Throwable { - URNData uRNData0 = new URNData(); - ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("|"); - // Undeclared exception! - try { - processInstanceResource0.getPersistData(uRNData0); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.camunda.bpm.cockpit.Cockpit", e); - } - } - - @Test(timeout = 4000) - public void test3() throws Throwable { - ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("xGUKD= Ea6(aT"); - // Undeclared exception! - try { - processInstanceResource0.insertNewRow("xGUKD= Ea6(aT"); - fail("Expecting exception: NoSuchElementException"); - - } catch(NoSuchElementException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.util.StringTokenizer", e); - } - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java deleted file mode 100644 index bb115f1586..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 13:45:16 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class ProcessInstanceResourceESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.ProcessInstanceResource"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ProcessInstanceResourceESTestscaffolding.class.getClassLoader() , - "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource", - "org.camunda.bpm.cockpit.CockpitRuntimeDelegate", - "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource", - "org.camunda.bpm.webapp.AppRuntimeDelegate", - "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource", - "org.camunda.bpm.cockpit.db.QueryService", - "org.camunda.bpm.engine.ProcessEngine", - "com.att.camunda.bpm.plugin.urnmap.resources.ProcessInstanceResource", - "org.camunda.bpm.engine.ProcessEngineServices", - "org.camunda.bpm.cockpit.db.CommandExecutor", - "org.camunda.bpm.cockpit.Cockpit", - "com.att.camunda.bpm.plugin.urnmap.db.URNData" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ProcessInstanceResourceESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.camunda.bpm.cockpit.Cockpit" - ); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java deleted file mode 100644 index ba562f9bde..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 13:48:27 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.shaded.org.mockito.Mockito.*; - -import javax.servlet.ServletContext; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.UriInfo; -import org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.ViolatedAssumptionAnswer; -import org.evosuite.runtime.javaee.injection.Injector; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class URNMapPluginRootResourceESTest extends URNMapPluginRootResourceESTestscaffolding { - - @Test(timeout = 4000) - public void test0() throws Throwable { - URNMapPluginRootResource uRNMapPluginRootResource0 = new URNMapPluginRootResource(); - HttpHeaders httpHeaders0 = mock(HttpHeaders.class, new ViolatedAssumptionAnswer()); - Injector.inject(uRNMapPluginRootResource0, (Class) AbstractAppPluginRootResource.class, "headers", (Object) httpHeaders0); - ServletContext servletContext0 = mock(ServletContext.class, new ViolatedAssumptionAnswer()); - Injector.inject(uRNMapPluginRootResource0, (Class) AbstractAppPluginRootResource.class, "servletContext", (Object) servletContext0); - UriInfo uriInfo0 = mock(UriInfo.class, new ViolatedAssumptionAnswer()); - Injector.inject(uRNMapPluginRootResource0, (Class) AbstractAppPluginRootResource.class, "uriInfo", (Object) uriInfo0); - Injector.validateBean(uRNMapPluginRootResource0, (Class) URNMapPluginRootResource.class); - URNResource uRNResource0 = uRNMapPluginRootResource0.getProcessInstanceResource("}+njRy')#n?K^"); - assertNotNull(uRNResource0); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java deleted file mode 100644 index 27070528cf..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 13:48:27 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class URNMapPluginRootResourceESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() , - "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource", - "org.camunda.bpm.webapp.plugin.spi.AppPlugin", - "com.att.camunda.bpm.plugin.urnmap.resources.URNResource", - "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", - "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource", - "org.openecomp.mso.logger.MsoLogger$ErrorCode", - "org.camunda.bpm.cockpit.Cockpit", - "com.att.eelf.configuration.EELFLogger", - "org.camunda.bpm.engine.rest.exception.RestException", - "com.att.eelf.configuration.SLF4jWrapper", - "com.att.eelf.i18n.EELFResourceManager", - "com.att.camunda.bpm.plugin.urnmap.db.URNData", - "org.openecomp.mso.logger.MsoLogger", - "org.openecomp.mso.logger.MessageEnum", - "com.att.eelf.i18n.EELFResolvableErrorEnum", - "org.openecomp.mso.logger.MsoLogger$ResponseCode", - "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource", - "org.openecomp.mso.entity.MsoRequest", - "org.camunda.bpm.webapp.AppRuntimeDelegate", - "org.openecomp.mso.logger.MsoLogger$StatusCode", - "com.att.eelf.configuration.EELFManager", - "com.att.camunda.bpm.plugin.urnmap.resources.URNMapPluginRootResource", - "com.att.eelf.i18n.EELFMsgs", - "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource", - "com.att.eelf.configuration.EELFLogger$Level", - "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource", - "org.openecomp.mso.logger.MsoLogger$Catalog" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.camunda.bpm.cockpit.Cockpit", - "org.openecomp.mso.logger.MsoLogger$Catalog", - "org.openecomp.mso.logger.MsoLogger", - "com.att.eelf.i18n.EELFResourceManager", - "com.att.eelf.i18n.EELFMsgs", - "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", - "com.att.eelf.configuration.EELFLogger$Level", - "com.att.eelf.configuration.EELFManager", - "org.openecomp.mso.logger.MessageEnum", - "com.att.camunda.bpm.plugin.urnmap.resources.URNResource", - "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource" - ); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java deleted file mode 100644 index 2c0a5eaf67..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTest.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * This file was automatically generated by EvoSuite - * Mon Nov 14 13:47:41 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import org.junit.Test; -import static org.junit.Assert.*; -import static org.evosuite.shaded.org.mockito.Mockito.*; -import static org.evosuite.runtime.EvoAssertions.*; -import com.att.camunda.bpm.plugin.urnmap.db.URNData; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.List; -import java.util.NoSuchElementException; -import org.evosuite.runtime.EvoRunner; -import org.evosuite.runtime.EvoRunnerParameters; -import org.evosuite.runtime.PrivateAccess; -import org.evosuite.runtime.ViolatedAssumptionAnswer; -import org.junit.runner.RunWith; - -@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) -public class URNResourceESTest extends URNResourceESTestscaffolding { - - @Test(timeout = 4000) - public void test00() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer()); - doReturn((-3202)).when(preparedStatement0).executeUpdate(); - Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); - doReturn("").when(connection0).toString(); - doReturn(preparedStatement0).when(connection0).prepareStatement(anyString()); - PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); - uRNResource0.insertNewRow("pE|b"); - } - - @Test(timeout = 4000) - public void test01() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(connection0).toString(); - doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString()); - PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); - uRNResource0.insertNewRow("pE|b"); - } - - @Test(timeout = 4000) - public void test02() throws Throwable { - URNResource uRNResource0 = new URNResource(""); - List list0 = uRNResource0.getUrnDataMap(); - assertTrue(list0.isEmpty()); - } - - @Test(timeout = 4000) - public void test03() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer()); - doReturn((-3202)).when(preparedStatement0).executeUpdate(); - Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); - doReturn("").when(connection0).toString(); - doReturn(preparedStatement0).when(connection0).prepareStatement(anyString()); - PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); - URNData uRNData0 = new URNData(); - uRNResource0.getPersistData(uRNData0); - assertNull(uRNData0.getVer_()); - } - - @Test(timeout = 4000) - public void test04() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(connection0).toString(); - doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString()); - PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); - URNData uRNData0 = new URNData(); - uRNResource0.getPersistData(uRNData0); - assertNull(uRNData0.getVer_()); - } - - @Test(timeout = 4000) - public void test05() throws Throwable { - URNResource uRNResource0 = new URNResource("LR6iOYH?>Bg%1-x=lK"); - // Undeclared exception! - try { - uRNResource0.insertNewRow("LR6iOYH?>Bg%1-x=lK"); - fail("Expecting exception: NoSuchElementException"); - - } catch(NoSuchElementException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.util.StringTokenizer", e); - } - } - - @Test(timeout = 4000) - public void test06() throws Throwable { - URNResource uRNResource0 = new URNResource(""); - // Undeclared exception! - try { - uRNResource0.insertNewRow((String) null); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("java.util.StringTokenizer", e); - } - } - - @Test(timeout = 4000) - public void test07() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - // Undeclared exception! - try { - uRNResource0.getUrnDataMapOLD(); - fail("Expecting exception: NullPointerException"); - - } catch(NullPointerException e) { - // - // no message in exception (getMessage() returned null) - // - verifyException("org.camunda.bpm.cockpit.Cockpit", e); - } - } - - @Test(timeout = 4000) - public void test08() throws Throwable { - URNResource uRNResource0 = new URNResource(""); - Connection connection0 = uRNResource0.getDBConnection(); - assertNull(connection0); - } - - @Test(timeout = 4000) - public void test09() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); - doReturn((String) null).when(connection0).toString(); - PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); - Connection connection1 = uRNResource0.getDBConnection(); - assertSame(connection1, connection0); - } - - @Test(timeout = 4000) - public void test10() throws Throwable { - URNResource uRNResource0 = new URNResource("pE|b"); - ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer()); - doReturn(false).when(resultSet0).next(); - PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer()); - doReturn(resultSet0).when(preparedStatement0).executeQuery(); - Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); - doReturn("").when(connection0).toString(); - doReturn(preparedStatement0).when(connection0).prepareStatement(anyString()); - PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); - List list0 = uRNResource0.getUrnDataMap(); - assertTrue(list0.isEmpty()); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java deleted file mode 100644 index 885426f3c8..0000000000 --- a/bpmn/MSOURN-plugin/src/test/java/com/att/camunda/bpm/plugin/urnmap/resources/URNResourceESTestscaffolding.java +++ /dev/null @@ -1,400 +0,0 @@ -/** - * Scaffolding file used to store all the setups needed to run - * tests automatically generated by EvoSuite - * Mon Nov 14 13:47:41 GMT 2016 - */ - -package com.att.camunda.bpm.plugin.urnmap.resources; - -import org.evosuite.runtime.annotation.EvoSuiteClassExclude; -import org.junit.BeforeClass; -import org.junit.Before; -import org.junit.After; -import org.junit.AfterClass; -import org.evosuite.runtime.sandbox.Sandbox; - -@EvoSuiteClassExclude -public class URNResourceESTestscaffolding { - - @org.junit.Rule - public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); - - private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); - - private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); - - @BeforeClass - public static void initEvoSuiteFramework() { - org.evosuite.runtime.RuntimeSettings.className = "com.att.camunda.bpm.plugin.urnmap.resources.URNResource"; - org.evosuite.runtime.GuiSupport.initialize(); - org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; - org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; - org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; - org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; - org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); - org.evosuite.runtime.classhandling.JDKClassResetter.init(); - initializeClasses(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - } - - @AfterClass - public static void clearEvoSuiteFramework(){ - Sandbox.resetDefaultSecurityManager(); - java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); - } - - @Before - public void initTestCase(){ - threadStopper.storeCurrentThreads(); - threadStopper.startRecordingTime(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); - org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); - - org.evosuite.runtime.GuiSupport.setHeadless(); - org.evosuite.runtime.Runtime.getInstance().resetRuntime(); - org.evosuite.runtime.agent.InstrumentingAgent.activate(); - } - - @After - public void doneWithTestCase(){ - threadStopper.killAndJoinClientThreads(); - org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); - org.evosuite.runtime.classhandling.JDKClassResetter.reset(); - resetClasses(); - org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); - org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); - org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); - } - - - private static void initializeClasses() { - org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNResourceESTestscaffolding.class.getClassLoader() , - "org.h2.store.LobStorage", - "com.mysql.jdbc.VersionedStringProperty", - "com.mysql.jdbc.StatementInterceptorV2", - "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty", - "org.h2.engine.SessionInterface", - "org.h2.index.BaseIndex", - "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty", - "org.h2.store.fs.FileNioMemData", - "org.h2.store.fs.FileNioMem", - "org.h2.store.fs.FilePathCrypt$FileCrypt", - "org.h2.result.Row", - "org.h2.engine.RightOwner", - "org.h2.table.TableView", - "com.mysql.jdbc.JDBC4ClientInfoProvider", - "com.mysql.jdbc.CachedResultSetMetaData", - "org.h2.store.fs.FileMem$1", - "com.mysql.jdbc.ConnectionFeatureNotAvailableException", - "org.h2.security.BlockCipher", - "org.h2.command.CommandInterface", - "com.mysql.jdbc.MysqlIO", - "com.mysql.jdbc.Connection", - "com.att.eelf.i18n.EELFMsgs", - "com.mysql.jdbc.ConnectionPropertiesImpl", - "org.h2.constant.DbSettings", - "com.mysql.jdbc.SingleByteCharsetConverter", - "com.mysql.jdbc.PingTarget", - "org.h2.index.PageIndex", - "org.h2.util.BitField", - "org.h2.value.ValueNull", - "org.h2.value.ValueShort", - "com.mysql.jdbc.SocketFactory", - "org.h2.value.ValueDecimal", - "com.mysql.jdbc.PacketTooBigException", - "com.mysql.jdbc.log.StandardLogger", - "com.mysql.jdbc.ConnectionImpl$3", - "com.mysql.jdbc.ConnectionImpl$2", - "com.mysql.jdbc.ConnectionImpl$5", - "com.mysql.jdbc.ConnectionImpl$4", - "com.mysql.jdbc.ConnectionImpl$7", - "com.mysql.jdbc.ConnectionImpl$6", - "org.h2.util.SmallLRUCache", - "org.h2.mvstore.Chunk", - "com.mysql.jdbc.ConnectionImpl$9", - "com.mysql.jdbc.ConnectionImpl$8", - "com.mysql.jdbc.log.Log", - "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty", - "com.mysql.jdbc.StringUtils", - "org.h2.mvstore.MVStore", - "org.h2.engine.DbObjectBase", - "org.h2.store.FileLock", - "com.mysql.jdbc.ResultSetImpl", - "org.h2.schema.Sequence", - "org.h2.value.Value", - "org.h2.store.fs.FilePathMem", - "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty", - "org.h2.store.fs.FilePath", - "org.h2.engine.DatabaseCloser", - "org.h2.expression.ExpressionColumn", - "com.mysql.jdbc.Statement", - "com.mysql.jdbc.Buffer", - "org.h2.store.fs.FilePathNioMem", - "com.mysql.jdbc.ParameterBindings", - "org.h2.security.SecureFileStore", - "org.h2.store.fs.FileMem", - "com.mysql.jdbc.BufferRow", - "org.h2.expression.Expression", - "org.h2.store.fs.FileSplit", - "org.h2.util.Utils$1", - "org.h2.value.CompareMode", - "org.h2.util.Utils", - "com.mysql.jdbc.exceptions.MySQLTimeoutException", - "org.h2.command.dml.SetTypes", - "org.openecomp.mso.logger.MsoLogger$ErrorCode", - "org.h2.jdbcx.JdbcDataSourceFactory", - "com.mysql.jdbc.Util", - "org.camunda.bpm.cockpit.Cockpit", - "org.h2.value.ValueString", - "org.h2.value.ValueJavaObject", - "org.h2.store.PageStore", - "com.mysql.jdbc.ConnectionPropertiesImpl$XmlMap", - "org.h2.schema.Schema", - "org.h2.engine.SettingsBase", - "com.mysql.jdbc.CommunicationsException", - "org.h2.value.CompareModeDefault", - "org.h2.engine.SessionWithState", - "org.h2.table.TableLinkConnection", - "org.h2.message.Trace", - "org.h2.engine.Comment", - "org.h2.util.New", - "org.camunda.bpm.engine.ProcessEngine", - "org.h2.value.ValueInt", - "org.h2.util.CacheWriter", - "com.mysql.jdbc.CompressedInputStream", - "org.h2.result.ResultInterface", - "org.h2.util.StringUtils", - "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource", - "org.h2.table.IndexColumn", - "org.openecomp.mso.logger.MsoLogger$Catalog", - "org.h2.value.CompareModeIcu4J", - "com.mysql.jdbc.ResultSetRow", - "com.mysql.jdbc.ConnectionImpl", - "com.mysql.jdbc.log.NullLogger", - "org.camunda.bpm.cockpit.db.QueryService", - "org.camunda.bpm.engine.ProcessEngineServices", - "com.mysql.jdbc.JDBC4PreparedStatement", - "org.h2.schema.SchemaObject", - "org.h2.store.FileStore", - "org.h2.engine.SessionRemote", - "org.h2.value.ValueUuid", - "org.h2.mvstore.type.DataType", - "org.h2.index.IndexType", - "org.h2.value.ValueDate", - "org.h2.result.SearchRow", - "org.h2.table.Table", - "com.att.camunda.bpm.plugin.urnmap.db.URNData", - "org.h2.store.fs.FileMemData", - "org.h2.value.ValueFloat", - "org.openecomp.mso.entity.MsoRequest", - "org.camunda.bpm.webapp.AppRuntimeDelegate", - "org.h2.value.Transfer", - "com.mysql.jdbc.Messages", - "org.h2.store.fs.FileDisk", - "com.mysql.jdbc.NetworkResources", - "org.h2.result.RowList", - "com.mysql.jdbc.CallableStatement$CallableStatementParamInfo", - "org.h2.constant.ErrorCode", - "com.mysql.jdbc.Collation", - "org.h2.message.TraceObject", - "com.mysql.jdbc.ByteArrayRow", - "org.h2.store.fs.FileChannelOutputStream", - "org.h2.value.ValueBoolean", - "org.h2.value.ValueLobDb", - "org.h2.util.SourceCompiler", - "org.h2.engine.UserDataType", - "org.h2.constraint.Constraint", - "org.h2.table.TableBase", - "org.h2.jdbcx.JdbcConnectionPool", - "com.mysql.jdbc.authentication.Sha256PasswordPlugin", - "org.h2.value.ValueLong", - "org.h2.engine.DbObject", - "com.mysql.jdbc.JDBC4CallableStatement", - "org.h2.util.SortedProperties", - "org.h2.value.ValueStringIgnoreCase", - "org.h2.table.PlanItem", - "org.h2.jdbcx.JdbcXAConnection", - "org.h2.engine.UserAggregate", - "org.h2.message.DbException", - "com.mysql.jdbc.JDBC4ServerPreparedStatement", - "org.h2.mvstore.MVMapConcurrent", - "com.mysql.jdbc.Extension", - "org.hsqldb.jdbc.JDBCDriver", - "org.h2.engine.Database", - "org.h2.api.DatabaseEventListener", - "org.h2.jdbcx.JdbcDataSource", - "org.h2.schema.TriggerObject", - "org.h2.store.DataReader", - "com.mysql.jdbc.StatementImpl", - "org.hsqldb.jdbc.JDBCDriver$1", - "org.h2.value.ValueBytes", - "org.h2.value.ValueResultSet", - "com.att.eelf.i18n.EELFResolvableErrorEnum", - "org.h2.value.ValueDouble", - "com.mysql.jdbc.CallableStatement$CallableStatementParam", - "org.h2.schema.SchemaObjectBase", - "com.att.eelf.configuration.EELFLogger$Level", - "com.mysql.jdbc.StatementImpl$CancelTask$1", - "org.h2.mvstore.Page", - "org.h2.index.PageDelegateIndex", - "org.h2.store.fs.FileBase", - "com.mysql.jdbc.StatementImpl$CancelTask", - "com.att.camunda.bpm.plugin.urnmap.resources.URNResource", - "org.h2.message.TraceWriter", - "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", - "com.att.eelf.configuration.EELFLogger", - "org.h2.table.Column", - "org.h2.engine.Session", - "org.h2.engine.Mode", - "com.mysql.jdbc.exceptions.MySQLTransientException", - "org.h2.engine.Setting", - "org.h2.util.SourceCompiler$1", - "org.h2.value.ValueArray", - "com.mysql.jdbc.MySQLConnection", - "org.h2.util.TempFileDeleter", - "org.h2.store.fs.FileNioMem$1", - "com.mysql.jdbc.AuthenticationPlugin", - "org.h2.util.MathUtils", - "org.h2.mvstore.DataUtils", - "org.h2.store.fs.FilePathSplit", - "org.h2.value.ValueStringFixed", - "com.mysql.jdbc.JDBC4Connection", - "com.mysql.jdbc.NonRegisteringDriver$1", - "org.h2.engine.User", - "org.h2.value.ValueTimestamp", - "org.h2.value.Value$ValueBlob", - "org.h2.store.fs.FilePathWrapper", - "org.h2.constant.SysProperties", - "com.mysql.jdbc.IterateBlock", - "org.h2.table.RegularTable", - "com.mysql.jdbc.Util$RandStructcture", - "org.h2.store.fs.FileChannelInputStream", - "com.mysql.jdbc.exceptions.MySQLStatementCancelledException", - "com.mysql.jdbc.PreparedStatement", - "org.h2.compress.Compressor", - "com.mysql.jdbc.util.LRUCache", - "com.mysql.jdbc.util.ReadAheadInputStream", - "org.h2.index.Index", - "com.mysql.jdbc.MysqlDataTruncation", - "com.mysql.jdbc.CharsetMapping", - "org.h2.store.fs.FilePathDisk", - "org.h2.mvstore.MVMap", - "com.mysql.jdbc.Field", - "com.att.eelf.configuration.SLF4jWrapper", - "com.mysql.jdbc.PreparedStatement$BatchVisitor", - "org.h2.store.DataHandler", - "org.h2.jdbc.JdbcConnection", - "org.openecomp.mso.logger.MsoLogger", - "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty", - "com.mysql.jdbc.ConnectionProperties", - "org.h2.Driver", - "org.h2.engine.Role", - "com.mysql.jdbc.Driver", - "org.h2.value.ValueByte", - "com.mysql.jdbc.ServerPreparedStatement", - "org.camunda.bpm.cockpit.db.CommandExecutor", - "com.mysql.jdbc.exceptions.MySQLNonTransientException", - "org.camunda.bpm.cockpit.CockpitRuntimeDelegate", - "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource", - "com.mysql.jdbc.MysqlSavepoint", - "com.mysql.jdbc.CallableStatement", - "com.mysql.jdbc.RowData", - "org.h2.value.Value$ValueClob", - "com.att.eelf.i18n.EELFResourceManager", - "org.h2.value.ValueJavaObject$NotSerialized", - "org.h2.value.CaseInsensitiveMap", - "com.mysql.jdbc.CallableStatement$CallableStatementParamInfoJDBC3", - "org.h2.util.IOUtils", - "com.mysql.jdbc.PreparedStatement$ParseInfo", - "org.h2.message.TraceSystem", - "org.openecomp.mso.logger.MessageEnum", - "org.openecomp.mso.logger.MsoLogger$ResponseCode", - "org.openecomp.mso.logger.MsoLogger$StatusCode", - "com.att.eelf.configuration.EELFManager", - "com.mysql.jdbc.StreamingNotifiable", - "com.mysql.jdbc.ResultSetInternalMethods", - "org.h2.command.Prepared", - "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty", - "com.mysql.jdbc.NonRegisteringDriver", - "org.h2.jdbc.JdbcSQLException", - "org.h2.mvstore.MVMap$MapBuilder", - "org.h2.engine.ConnectionInfo", - "com.att.eelf.i18n.EELFResourceManager$1", - "com.mysql.jdbc.ExceptionInterceptor", - "org.h2.value.ValueTime" - ); - } - - private static void resetClasses() { - org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNResourceESTestscaffolding.class.getClassLoader()); - - org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( - "org.openecomp.mso.logger.MsoLogger$Catalog", - "org.openecomp.mso.logger.MsoLogger", - "com.att.eelf.i18n.EELFResourceManager", - "com.att.eelf.i18n.EELFMsgs", - "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", - "com.att.eelf.configuration.EELFLogger$Level", - "com.att.eelf.configuration.EELFManager", - "org.openecomp.mso.logger.MessageEnum", - "com.att.camunda.bpm.plugin.urnmap.resources.URNResource", - "org.camunda.bpm.cockpit.Cockpit", - "org.h2.jdbcx.JdbcConnectionPool", - "org.h2.message.TraceObject", - "com.mysql.jdbc.NonRegisteringDriver", - "com.mysql.jdbc.Driver", - "org.hsqldb.jdbc.JDBCDriver", - "org.h2.Driver", - "org.h2.jdbcx.JdbcDataSource", - "org.h2.jdbcx.JdbcDataSourceFactory", - "org.h2.message.TraceSystem", - "org.h2.util.Utils", - "org.h2.util.MathUtils", - "org.h2.constant.SysProperties", - "org.h2.message.Trace", - "org.h2.util.StringUtils", - "org.h2.value.Value", - "org.h2.value.ValueDecimal", - "org.h2.jdbcx.JdbcXAConnection", - "org.h2.mvstore.MVStore", - "com.mysql.jdbc.Messages", - "com.mysql.jdbc.ConnectionPropertiesImpl", - "com.mysql.jdbc.Util", - "com.mysql.jdbc.ConnectionImpl", - "com.mysql.jdbc.JDBC4Connection", - "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty", - "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty", - "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty", - "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty", - "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty", - "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty", - "com.mysql.jdbc.StringUtils", - "com.mysql.jdbc.CharsetMapping", - "com.mysql.jdbc.log.StandardLogger", - "org.h2.engine.SessionRemote", - "org.h2.mvstore.DataUtils", - "org.h2.message.DbException", - "org.h2.constant.ErrorCode", - "org.h2.jdbc.JdbcSQLException", - "org.h2.command.dml.SetTypes", - "org.h2.engine.ConnectionInfo", - "org.h2.engine.Database", - "org.h2.util.BitField", - "org.h2.engine.Mode", - "org.h2.store.fs.FilePath", - "org.h2.store.fs.FilePathDisk", - "org.h2.store.fs.FilePathMem", - "org.h2.store.fs.FilePathNioMem", - "org.h2.store.fs.FilePathSplit", - "org.h2.constant.DbSettings", - "org.h2.value.CompareMode", - "org.h2.store.FileLock", - "org.h2.util.SortedProperties", - "org.h2.table.Table", - "com.mysql.jdbc.StatementImpl", - "com.mysql.jdbc.PreparedStatement", - "com.mysql.jdbc.MysqlIO", - "com.mysql.jdbc.CallableStatement" - ); - } -} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java new file mode 100644 index 0000000000..386835c55d --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTest.java @@ -0,0 +1,43 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:49:02 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap; + +import org.junit.Test; + +import static org.junit.Assert.*; + +import java.util.List; +import java.util.Set; + +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; +import org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class URNMapPluginESTest extends URNMapPluginESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + URNMapPlugin uRNMapPlugin0 = new URNMapPlugin(); + Set> set0 = uRNMapPlugin0.getResourceClasses(); + assertFalse(set0.isEmpty()); + } + + @Test(timeout = 4000) + public void test1() throws Throwable { + URNMapPlugin uRNMapPlugin0 = new URNMapPlugin(); + String string0 = uRNMapPlugin0.getId(); + assertEquals("urnMap-plugin", string0); + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + URNMapPlugin uRNMapPlugin0 = new URNMapPlugin(); + List list0 = uRNMapPlugin0.getMappingFiles(); + assertEquals(1, list0.size()); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java new file mode 100644 index 0000000000..d01955f3fb --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/URNMapPluginESTestscaffolding.java @@ -0,0 +1,91 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:49:02 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class URNMapPluginESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginESTestscaffolding.class.getClassLoader() , + "org.camunda.bpm.webapp.plugin.spi.impl.AbstractAppPlugin", + "org.camunda.bpm.webapp.plugin.spi.AppPlugin", + "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource", + "org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin", + "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource", + "org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource", + "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource", + "org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.camunda.bpmn.plugin.urnmap.URNMapPlugin" + ); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java new file mode 100644 index 0000000000..f42e2a49a4 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTest.java @@ -0,0 +1,88 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:48:50 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import org.junit.Test; + +import static org.junit.Assert.*; + +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; +import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class URNDataESTest extends URNDataESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setVer_("yE)"); + String string0 = uRNData0.getVer_(); + assertEquals("yE)", string0); + } + + @Test(timeout = 4000) + public void test1() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNValue("Dw]M@,~.D"); + String string0 = uRNData0.getURNValue(); + assertEquals("Dw]M@,~.D", string0); + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNName(""); + String string0 = uRNData0.getURNName(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test3() throws Throwable { + URNData uRNData0 = new URNData(); + String string0 = uRNData0.getVer_(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test4() throws Throwable { + URNData uRNData0 = new URNData(); + String string0 = uRNData0.getURNValue(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test5() throws Throwable { + URNData uRNData0 = new URNData(); + String string0 = uRNData0.getURNName(); + assertNull(string0); + } + + @Test(timeout = 4000) + public void test6() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNValue(""); + String string0 = uRNData0.getURNValue(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test7() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setVer_(""); + String string0 = uRNData0.getVer_(); + assertEquals("", string0); + } + + @Test(timeout = 4000) + public void test8() throws Throwable { + URNData uRNData0 = new URNData(); + uRNData0.setURNName("2Gv9h[mmV=,z\"VSY`t)"); + String string0 = uRNData0.getURNName(); + assertEquals("2Gv9h[mmV=,z\"VSY`t)", string0); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java new file mode 100644 index 0000000000..cb0adccf12 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNDataESTestscaffolding.java @@ -0,0 +1,78 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:48:50 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class URNDataESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNDataESTestscaffolding.class.getClassLoader() , + "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData" + ); + } + + private static void resetClasses() { + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java new file mode 100644 index 0000000000..9838ff023d --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTest.java @@ -0,0 +1,36 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:47:07 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import org.junit.Test; + +import static org.junit.Assert.*; +import static org.evosuite.runtime.EvoAssertions.*; + +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; +import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class URNServiceESTest extends URNServiceESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + URNService uRNService0 = new URNService(); + // Undeclared exception! + try { + uRNService0.getProperties(); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService", e); + } + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java new file mode 100644 index 0000000000..887e11acb6 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/db/URNServiceESTestscaffolding.java @@ -0,0 +1,97 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:47:07 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.db; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class URNServiceESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNServiceESTestscaffolding.class.getClassLoader() , + "org.camunda.bpm.engine.ProcessEngineException", + "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNService", + "org.camunda.bpm.engine.impl.interceptor.Command", + "org.camunda.bpm.engine.ClassLoadingException", + "org.camunda.bpm.engine.ProcessEngine", + "org.camunda.bpm.engine.ProcessEngines", + "org.camunda.bpm.engine.ProcessEngineInfo", + "org.camunda.bpm.application.ProcessApplicationUnavailableException", + "org.camunda.bpm.engine.impl.ProcessEngineImpl", + "org.camunda.bpm.engine.impl.context.Context", + "org.camunda.bpm.engine.impl.util.ReflectUtil", + "org.camunda.bpm.engine.ProcessEngineServices", + "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNServiceESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.camunda.bpm.engine.impl.context.Context", + "org.camunda.bpm.engine.ProcessEngines", + "org.camunda.bpm.engine.impl.util.ReflectUtil" + ); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java new file mode 100644 index 0000000000..8f45b8a0af --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTest.java @@ -0,0 +1,88 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:45:16 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import org.junit.Test; + +import static org.junit.Assert.*; +import static org.evosuite.runtime.EvoAssertions.*; + +import java.util.NoSuchElementException; + +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.junit.runner.RunWith; +import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData; +import org.openecomp.camunda.bpmn.plugin.urnmap.resources.ProcessInstanceResource; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class ProcessInstanceResourceESTest extends ProcessInstanceResourceESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource((String) null); + // Undeclared exception! + try { + processInstanceResource0.getUrnDataMap(); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.camunda.bpm.cockpit.Cockpit", e); + } + } + + @Test(timeout = 4000) + public void test1() throws Throwable { + ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("DEUtDF$-rb|D]l9"); + // Undeclared exception! + try { + processInstanceResource0.insertNewRow("DEUtDF$-rb|D]l9"); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.camunda.bpm.cockpit.Cockpit", e); + } + } + + @Test(timeout = 4000) + public void test2() throws Throwable { + URNData uRNData0 = new URNData(); + ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("|"); + // Undeclared exception! + try { + processInstanceResource0.getPersistData(uRNData0); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.camunda.bpm.cockpit.Cockpit", e); + } + } + + @Test(timeout = 4000) + public void test3() throws Throwable { + ProcessInstanceResource processInstanceResource0 = new ProcessInstanceResource("xGUKD= Ea6(aT"); + // Undeclared exception! + try { + processInstanceResource0.insertNewRow("xGUKD= Ea6(aT"); + fail("Expecting exception: NoSuchElementException"); + + } catch(NoSuchElementException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("java.util.StringTokenizer", e); + } + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java new file mode 100644 index 0000000000..27ae3e4dcd --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResourceESTestscaffolding.java @@ -0,0 +1,94 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:45:16 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class ProcessInstanceResourceESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.resources.ProcessInstanceResource"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ProcessInstanceResourceESTestscaffolding.class.getClassLoader() , + "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource", + "org.camunda.bpm.cockpit.CockpitRuntimeDelegate", + "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource", + "org.camunda.bpm.webapp.AppRuntimeDelegate", + "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource", + "org.camunda.bpm.cockpit.db.QueryService", + "org.camunda.bpm.engine.ProcessEngine", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.ProcessInstanceResource", + "org.camunda.bpm.engine.ProcessEngineServices", + "org.camunda.bpm.cockpit.db.CommandExecutor", + "org.camunda.bpm.cockpit.Cockpit", + "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ProcessInstanceResourceESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.camunda.bpm.cockpit.Cockpit" + ); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java new file mode 100644 index 0000000000..85a7f341f2 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTest.java @@ -0,0 +1,42 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:48:27 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import org.junit.Test; + +import static org.junit.Assert.*; +import static org.evosuite.shaded.org.mockito.Mockito.*; + +import javax.servlet.ServletContext; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.UriInfo; + +import org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource; +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.evosuite.runtime.ViolatedAssumptionAnswer; +import org.evosuite.runtime.javaee.injection.Injector; +import org.junit.runner.RunWith; +import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource; +import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class URNMapPluginRootResourceESTest extends URNMapPluginRootResourceESTestscaffolding { + + @Test(timeout = 4000) + public void test0() throws Throwable { + URNMapPluginRootResource uRNMapPluginRootResource0 = new URNMapPluginRootResource(); + HttpHeaders httpHeaders0 = mock(HttpHeaders.class, new ViolatedAssumptionAnswer()); + Injector.inject(uRNMapPluginRootResource0, (Class) AbstractAppPluginRootResource.class, "headers", (Object) httpHeaders0); + ServletContext servletContext0 = mock(ServletContext.class, new ViolatedAssumptionAnswer()); + Injector.inject(uRNMapPluginRootResource0, (Class) AbstractAppPluginRootResource.class, "servletContext", (Object) servletContext0); + UriInfo uriInfo0 = mock(UriInfo.class, new ViolatedAssumptionAnswer()); + Injector.inject(uRNMapPluginRootResource0, (Class) AbstractAppPluginRootResource.class, "uriInfo", (Object) uriInfo0); + Injector.validateBean(uRNMapPluginRootResource0, (Class) URNMapPluginRootResource.class); + URNResource uRNResource0 = uRNMapPluginRootResource0.getProcessInstanceResource("}+njRy')#n?K^"); + assertNotNull(uRNResource0); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java new file mode 100644 index 0000000000..9b556d7006 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNMapPluginRootResourceESTestscaffolding.java @@ -0,0 +1,119 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:48:27 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class URNMapPluginRootResourceESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader() , + "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource", + "org.camunda.bpm.webapp.plugin.spi.AppPlugin", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource", + "org.openecomp.mso.logger.MsoLogger$ErrorCode", + "org.camunda.bpm.cockpit.Cockpit", + "com.att.eelf.configuration.EELFLogger", + "org.camunda.bpm.engine.rest.exception.RestException", + "com.att.eelf.configuration.SLF4jWrapper", + "com.att.eelf.i18n.EELFResourceManager", + "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData", + "org.openecomp.mso.logger.MsoLogger", + "org.openecomp.mso.logger.MessageEnum", + "com.att.eelf.i18n.EELFResolvableErrorEnum", + "org.openecomp.mso.logger.MsoLogger$ResponseCode", + "org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource", + "org.openecomp.mso.entity.MsoRequest", + "org.camunda.bpm.webapp.AppRuntimeDelegate", + "org.openecomp.mso.logger.MsoLogger$StatusCode", + "com.att.eelf.configuration.EELFManager", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNMapPluginRootResource", + "com.att.eelf.i18n.EELFMsgs", + "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource", + "com.att.eelf.configuration.EELFLogger$Level", + "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource", + "org.openecomp.mso.logger.MsoLogger$Catalog" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNMapPluginRootResourceESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.camunda.bpm.cockpit.Cockpit", + "org.openecomp.mso.logger.MsoLogger$Catalog", + "org.openecomp.mso.logger.MsoLogger", + "com.att.eelf.i18n.EELFResourceManager", + "com.att.eelf.i18n.EELFMsgs", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "com.att.eelf.configuration.EELFLogger$Level", + "com.att.eelf.configuration.EELFManager", + "org.openecomp.mso.logger.MessageEnum", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource", + "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginRootResource" + ); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java new file mode 100644 index 0000000000..b6b5478130 --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTest.java @@ -0,0 +1,165 @@ +/* + * This file was automatically generated by EvoSuite + * Mon Nov 14 13:47:41 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import org.junit.Test; + +import static org.junit.Assert.*; +import static org.evosuite.shaded.org.mockito.Mockito.*; +import static org.evosuite.runtime.EvoAssertions.*; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.List; +import java.util.NoSuchElementException; + +import org.evosuite.runtime.EvoRunner; +import org.evosuite.runtime.EvoRunnerParameters; +import org.evosuite.runtime.PrivateAccess; +import org.evosuite.runtime.ViolatedAssumptionAnswer; +import org.junit.runner.RunWith; +import org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData; +import org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource; + +@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) +public class URNResourceESTest extends URNResourceESTestscaffolding { + + @Test(timeout = 4000) + public void test00() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer()); + doReturn((-3202)).when(preparedStatement0).executeUpdate(); + Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); + doReturn("").when(connection0).toString(); + doReturn(preparedStatement0).when(connection0).prepareStatement(anyString()); + PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); + uRNResource0.insertNewRow("pE|b"); + } + + @Test(timeout = 4000) + public void test01() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(connection0).toString(); + doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString()); + PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); + uRNResource0.insertNewRow("pE|b"); + } + + @Test(timeout = 4000) + public void test02() throws Throwable { + URNResource uRNResource0 = new URNResource(""); + List list0 = uRNResource0.getUrnDataMap(); + assertTrue(list0.isEmpty()); + } + + @Test(timeout = 4000) + public void test03() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer()); + doReturn((-3202)).when(preparedStatement0).executeUpdate(); + Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); + doReturn("").when(connection0).toString(); + doReturn(preparedStatement0).when(connection0).prepareStatement(anyString()); + PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); + URNData uRNData0 = new URNData(); + uRNResource0.getPersistData(uRNData0); + assertNull(uRNData0.getVer_()); + } + + @Test(timeout = 4000) + public void test04() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(connection0).toString(); + doReturn((PreparedStatement) null).when(connection0).prepareStatement(anyString()); + PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); + URNData uRNData0 = new URNData(); + uRNResource0.getPersistData(uRNData0); + assertNull(uRNData0.getVer_()); + } + + @Test(timeout = 4000) + public void test05() throws Throwable { + URNResource uRNResource0 = new URNResource("LR6iOYH?>Bg%1-x=lK"); + // Undeclared exception! + try { + uRNResource0.insertNewRow("LR6iOYH?>Bg%1-x=lK"); + fail("Expecting exception: NoSuchElementException"); + + } catch(NoSuchElementException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("java.util.StringTokenizer", e); + } + } + + @Test(timeout = 4000) + public void test06() throws Throwable { + URNResource uRNResource0 = new URNResource(""); + // Undeclared exception! + try { + uRNResource0.insertNewRow((String) null); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("java.util.StringTokenizer", e); + } + } + + @Test(timeout = 4000) + public void test07() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + // Undeclared exception! + try { + uRNResource0.getUrnDataMapOLD(); + fail("Expecting exception: NullPointerException"); + + } catch(NullPointerException e) { + // + // no message in exception (getMessage() returned null) + // + verifyException("org.camunda.bpm.cockpit.Cockpit", e); + } + } + + @Test(timeout = 4000) + public void test08() throws Throwable { + URNResource uRNResource0 = new URNResource(""); + Connection connection0 = uRNResource0.getDBConnection(); + assertNull(connection0); + } + + @Test(timeout = 4000) + public void test09() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); + doReturn((String) null).when(connection0).toString(); + PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); + Connection connection1 = uRNResource0.getDBConnection(); + assertSame(connection1, connection0); + } + + @Test(timeout = 4000) + public void test10() throws Throwable { + URNResource uRNResource0 = new URNResource("pE|b"); + ResultSet resultSet0 = mock(ResultSet.class, new ViolatedAssumptionAnswer()); + doReturn(false).when(resultSet0).next(); + PreparedStatement preparedStatement0 = mock(PreparedStatement.class, new ViolatedAssumptionAnswer()); + doReturn(resultSet0).when(preparedStatement0).executeQuery(); + Connection connection0 = mock(Connection.class, new ViolatedAssumptionAnswer()); + doReturn("").when(connection0).toString(); + doReturn(preparedStatement0).when(connection0).prepareStatement(anyString()); + PrivateAccess.setVariable((Class) URNResource.class, uRNResource0, "conn", (Object) connection0); + List list0 = uRNResource0.getUrnDataMap(); + assertTrue(list0.isEmpty()); + } +} diff --git a/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java new file mode 100644 index 0000000000..61ef8e6c0b --- /dev/null +++ b/bpmn/MSOURN-plugin/src/test/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/URNResourceESTestscaffolding.java @@ -0,0 +1,400 @@ +/** + * Scaffolding file used to store all the setups needed to run + * tests automatically generated by EvoSuite + * Mon Nov 14 13:47:41 GMT 2016 + */ + +package org.openecomp.camunda.bpmn.plugin.urnmap.resources; + +import org.evosuite.runtime.annotation.EvoSuiteClassExclude; +import org.junit.BeforeClass; +import org.junit.Before; +import org.junit.After; +import org.junit.AfterClass; +import org.evosuite.runtime.sandbox.Sandbox; + +@EvoSuiteClassExclude +public class URNResourceESTestscaffolding { + + @org.junit.Rule + public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); + + private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); + + private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); + + @BeforeClass + public static void initEvoSuiteFramework() { + org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource"; + org.evosuite.runtime.GuiSupport.initialize(); + org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; + org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; + org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; + org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; + org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); + org.evosuite.runtime.classhandling.JDKClassResetter.init(); + initializeClasses(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + } + + @AfterClass + public static void clearEvoSuiteFramework(){ + Sandbox.resetDefaultSecurityManager(); + java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); + } + + @Before + public void initTestCase(){ + threadStopper.storeCurrentThreads(); + threadStopper.startRecordingTime(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); + org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); + + org.evosuite.runtime.GuiSupport.setHeadless(); + org.evosuite.runtime.Runtime.getInstance().resetRuntime(); + org.evosuite.runtime.agent.InstrumentingAgent.activate(); + } + + @After + public void doneWithTestCase(){ + threadStopper.killAndJoinClientThreads(); + org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); + org.evosuite.runtime.classhandling.JDKClassResetter.reset(); + resetClasses(); + org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); + org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); + org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); + } + + + private static void initializeClasses() { + org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(URNResourceESTestscaffolding.class.getClassLoader() , + "org.h2.store.LobStorage", + "com.mysql.jdbc.VersionedStringProperty", + "com.mysql.jdbc.StatementInterceptorV2", + "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty", + "org.h2.engine.SessionInterface", + "org.h2.index.BaseIndex", + "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty", + "org.h2.store.fs.FileNioMemData", + "org.h2.store.fs.FileNioMem", + "org.h2.store.fs.FilePathCrypt$FileCrypt", + "org.h2.result.Row", + "org.h2.engine.RightOwner", + "org.h2.table.TableView", + "com.mysql.jdbc.JDBC4ClientInfoProvider", + "com.mysql.jdbc.CachedResultSetMetaData", + "org.h2.store.fs.FileMem$1", + "com.mysql.jdbc.ConnectionFeatureNotAvailableException", + "org.h2.security.BlockCipher", + "org.h2.command.CommandInterface", + "com.mysql.jdbc.MysqlIO", + "com.mysql.jdbc.Connection", + "com.att.eelf.i18n.EELFMsgs", + "com.mysql.jdbc.ConnectionPropertiesImpl", + "org.h2.constant.DbSettings", + "com.mysql.jdbc.SingleByteCharsetConverter", + "com.mysql.jdbc.PingTarget", + "org.h2.index.PageIndex", + "org.h2.util.BitField", + "org.h2.value.ValueNull", + "org.h2.value.ValueShort", + "com.mysql.jdbc.SocketFactory", + "org.h2.value.ValueDecimal", + "com.mysql.jdbc.PacketTooBigException", + "com.mysql.jdbc.log.StandardLogger", + "com.mysql.jdbc.ConnectionImpl$3", + "com.mysql.jdbc.ConnectionImpl$2", + "com.mysql.jdbc.ConnectionImpl$5", + "com.mysql.jdbc.ConnectionImpl$4", + "com.mysql.jdbc.ConnectionImpl$7", + "com.mysql.jdbc.ConnectionImpl$6", + "org.h2.util.SmallLRUCache", + "org.h2.mvstore.Chunk", + "com.mysql.jdbc.ConnectionImpl$9", + "com.mysql.jdbc.ConnectionImpl$8", + "com.mysql.jdbc.log.Log", + "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty", + "com.mysql.jdbc.StringUtils", + "org.h2.mvstore.MVStore", + "org.h2.engine.DbObjectBase", + "org.h2.store.FileLock", + "com.mysql.jdbc.ResultSetImpl", + "org.h2.schema.Sequence", + "org.h2.value.Value", + "org.h2.store.fs.FilePathMem", + "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty", + "org.h2.store.fs.FilePath", + "org.h2.engine.DatabaseCloser", + "org.h2.expression.ExpressionColumn", + "com.mysql.jdbc.Statement", + "com.mysql.jdbc.Buffer", + "org.h2.store.fs.FilePathNioMem", + "com.mysql.jdbc.ParameterBindings", + "org.h2.security.SecureFileStore", + "org.h2.store.fs.FileMem", + "com.mysql.jdbc.BufferRow", + "org.h2.expression.Expression", + "org.h2.store.fs.FileSplit", + "org.h2.util.Utils$1", + "org.h2.value.CompareMode", + "org.h2.util.Utils", + "com.mysql.jdbc.exceptions.MySQLTimeoutException", + "org.h2.command.dml.SetTypes", + "org.openecomp.mso.logger.MsoLogger$ErrorCode", + "org.h2.jdbcx.JdbcDataSourceFactory", + "com.mysql.jdbc.Util", + "org.camunda.bpm.cockpit.Cockpit", + "org.h2.value.ValueString", + "org.h2.value.ValueJavaObject", + "org.h2.store.PageStore", + "com.mysql.jdbc.ConnectionPropertiesImpl$XmlMap", + "org.h2.schema.Schema", + "org.h2.engine.SettingsBase", + "com.mysql.jdbc.CommunicationsException", + "org.h2.value.CompareModeDefault", + "org.h2.engine.SessionWithState", + "org.h2.table.TableLinkConnection", + "org.h2.message.Trace", + "org.h2.engine.Comment", + "org.h2.util.New", + "org.camunda.bpm.engine.ProcessEngine", + "org.h2.value.ValueInt", + "org.h2.util.CacheWriter", + "com.mysql.jdbc.CompressedInputStream", + "org.h2.result.ResultInterface", + "org.h2.util.StringUtils", + "org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginResource", + "org.h2.table.IndexColumn", + "org.openecomp.mso.logger.MsoLogger$Catalog", + "org.h2.value.CompareModeIcu4J", + "com.mysql.jdbc.ResultSetRow", + "com.mysql.jdbc.ConnectionImpl", + "com.mysql.jdbc.log.NullLogger", + "org.camunda.bpm.cockpit.db.QueryService", + "org.camunda.bpm.engine.ProcessEngineServices", + "com.mysql.jdbc.JDBC4PreparedStatement", + "org.h2.schema.SchemaObject", + "org.h2.store.FileStore", + "org.h2.engine.SessionRemote", + "org.h2.value.ValueUuid", + "org.h2.mvstore.type.DataType", + "org.h2.index.IndexType", + "org.h2.value.ValueDate", + "org.h2.result.SearchRow", + "org.h2.table.Table", + "org.openecomp.camunda.bpmn.plugin.urnmap.db.URNData", + "org.h2.store.fs.FileMemData", + "org.h2.value.ValueFloat", + "org.openecomp.mso.entity.MsoRequest", + "org.camunda.bpm.webapp.AppRuntimeDelegate", + "org.h2.value.Transfer", + "com.mysql.jdbc.Messages", + "org.h2.store.fs.FileDisk", + "com.mysql.jdbc.NetworkResources", + "org.h2.result.RowList", + "com.mysql.jdbc.CallableStatement$CallableStatementParamInfo", + "org.h2.constant.ErrorCode", + "com.mysql.jdbc.Collation", + "org.h2.message.TraceObject", + "com.mysql.jdbc.ByteArrayRow", + "org.h2.store.fs.FileChannelOutputStream", + "org.h2.value.ValueBoolean", + "org.h2.value.ValueLobDb", + "org.h2.util.SourceCompiler", + "org.h2.engine.UserDataType", + "org.h2.constraint.Constraint", + "org.h2.table.TableBase", + "org.h2.jdbcx.JdbcConnectionPool", + "com.mysql.jdbc.authentication.Sha256PasswordPlugin", + "org.h2.value.ValueLong", + "org.h2.engine.DbObject", + "com.mysql.jdbc.JDBC4CallableStatement", + "org.h2.util.SortedProperties", + "org.h2.value.ValueStringIgnoreCase", + "org.h2.table.PlanItem", + "org.h2.jdbcx.JdbcXAConnection", + "org.h2.engine.UserAggregate", + "org.h2.message.DbException", + "com.mysql.jdbc.JDBC4ServerPreparedStatement", + "org.h2.mvstore.MVMapConcurrent", + "com.mysql.jdbc.Extension", + "org.hsqldb.jdbc.JDBCDriver", + "org.h2.engine.Database", + "org.h2.api.DatabaseEventListener", + "org.h2.jdbcx.JdbcDataSource", + "org.h2.schema.TriggerObject", + "org.h2.store.DataReader", + "com.mysql.jdbc.StatementImpl", + "org.hsqldb.jdbc.JDBCDriver$1", + "org.h2.value.ValueBytes", + "org.h2.value.ValueResultSet", + "com.att.eelf.i18n.EELFResolvableErrorEnum", + "org.h2.value.ValueDouble", + "com.mysql.jdbc.CallableStatement$CallableStatementParam", + "org.h2.schema.SchemaObjectBase", + "com.att.eelf.configuration.EELFLogger$Level", + "com.mysql.jdbc.StatementImpl$CancelTask$1", + "org.h2.mvstore.Page", + "org.h2.index.PageDelegateIndex", + "org.h2.store.fs.FileBase", + "com.mysql.jdbc.StatementImpl$CancelTask", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource", + "org.h2.message.TraceWriter", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "com.att.eelf.configuration.EELFLogger", + "org.h2.table.Column", + "org.h2.engine.Session", + "org.h2.engine.Mode", + "com.mysql.jdbc.exceptions.MySQLTransientException", + "org.h2.engine.Setting", + "org.h2.util.SourceCompiler$1", + "org.h2.value.ValueArray", + "com.mysql.jdbc.MySQLConnection", + "org.h2.util.TempFileDeleter", + "org.h2.store.fs.FileNioMem$1", + "com.mysql.jdbc.AuthenticationPlugin", + "org.h2.util.MathUtils", + "org.h2.mvstore.DataUtils", + "org.h2.store.fs.FilePathSplit", + "org.h2.value.ValueStringFixed", + "com.mysql.jdbc.JDBC4Connection", + "com.mysql.jdbc.NonRegisteringDriver$1", + "org.h2.engine.User", + "org.h2.value.ValueTimestamp", + "org.h2.value.Value$ValueBlob", + "org.h2.store.fs.FilePathWrapper", + "org.h2.constant.SysProperties", + "com.mysql.jdbc.IterateBlock", + "org.h2.table.RegularTable", + "com.mysql.jdbc.Util$RandStructcture", + "org.h2.store.fs.FileChannelInputStream", + "com.mysql.jdbc.exceptions.MySQLStatementCancelledException", + "com.mysql.jdbc.PreparedStatement", + "org.h2.compress.Compressor", + "com.mysql.jdbc.util.LRUCache", + "com.mysql.jdbc.util.ReadAheadInputStream", + "org.h2.index.Index", + "com.mysql.jdbc.MysqlDataTruncation", + "com.mysql.jdbc.CharsetMapping", + "org.h2.store.fs.FilePathDisk", + "org.h2.mvstore.MVMap", + "com.mysql.jdbc.Field", + "com.att.eelf.configuration.SLF4jWrapper", + "com.mysql.jdbc.PreparedStatement$BatchVisitor", + "org.h2.store.DataHandler", + "org.h2.jdbc.JdbcConnection", + "org.openecomp.mso.logger.MsoLogger", + "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty", + "com.mysql.jdbc.ConnectionProperties", + "org.h2.Driver", + "org.h2.engine.Role", + "com.mysql.jdbc.Driver", + "org.h2.value.ValueByte", + "com.mysql.jdbc.ServerPreparedStatement", + "org.camunda.bpm.cockpit.db.CommandExecutor", + "com.mysql.jdbc.exceptions.MySQLNonTransientException", + "org.camunda.bpm.cockpit.CockpitRuntimeDelegate", + "org.camunda.bpm.webapp.plugin.resource.AbstractAppPluginResource", + "com.mysql.jdbc.MysqlSavepoint", + "com.mysql.jdbc.CallableStatement", + "com.mysql.jdbc.RowData", + "org.h2.value.Value$ValueClob", + "com.att.eelf.i18n.EELFResourceManager", + "org.h2.value.ValueJavaObject$NotSerialized", + "org.h2.value.CaseInsensitiveMap", + "com.mysql.jdbc.CallableStatement$CallableStatementParamInfoJDBC3", + "org.h2.util.IOUtils", + "com.mysql.jdbc.PreparedStatement$ParseInfo", + "org.h2.message.TraceSystem", + "org.openecomp.mso.logger.MessageEnum", + "org.openecomp.mso.logger.MsoLogger$ResponseCode", + "org.openecomp.mso.logger.MsoLogger$StatusCode", + "com.att.eelf.configuration.EELFManager", + "com.mysql.jdbc.StreamingNotifiable", + "com.mysql.jdbc.ResultSetInternalMethods", + "org.h2.command.Prepared", + "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty", + "com.mysql.jdbc.NonRegisteringDriver", + "org.h2.jdbc.JdbcSQLException", + "org.h2.mvstore.MVMap$MapBuilder", + "org.h2.engine.ConnectionInfo", + "com.att.eelf.i18n.EELFResourceManager$1", + "com.mysql.jdbc.ExceptionInterceptor", + "org.h2.value.ValueTime" + ); + } + + private static void resetClasses() { + org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(URNResourceESTestscaffolding.class.getClassLoader()); + + org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( + "org.openecomp.mso.logger.MsoLogger$Catalog", + "org.openecomp.mso.logger.MsoLogger", + "com.att.eelf.i18n.EELFResourceManager", + "com.att.eelf.i18n.EELFMsgs", + "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES", + "com.att.eelf.configuration.EELFLogger$Level", + "com.att.eelf.configuration.EELFManager", + "org.openecomp.mso.logger.MessageEnum", + "org.openecomp.camunda.bpmn.plugin.urnmap.resources.URNResource", + "org.camunda.bpm.cockpit.Cockpit", + "org.h2.jdbcx.JdbcConnectionPool", + "org.h2.message.TraceObject", + "com.mysql.jdbc.NonRegisteringDriver", + "com.mysql.jdbc.Driver", + "org.hsqldb.jdbc.JDBCDriver", + "org.h2.Driver", + "org.h2.jdbcx.JdbcDataSource", + "org.h2.jdbcx.JdbcDataSourceFactory", + "org.h2.message.TraceSystem", + "org.h2.util.Utils", + "org.h2.util.MathUtils", + "org.h2.constant.SysProperties", + "org.h2.message.Trace", + "org.h2.util.StringUtils", + "org.h2.value.Value", + "org.h2.value.ValueDecimal", + "org.h2.jdbcx.JdbcXAConnection", + "org.h2.mvstore.MVStore", + "com.mysql.jdbc.Messages", + "com.mysql.jdbc.ConnectionPropertiesImpl", + "com.mysql.jdbc.Util", + "com.mysql.jdbc.ConnectionImpl", + "com.mysql.jdbc.JDBC4Connection", + "com.mysql.jdbc.ConnectionPropertiesImpl$ConnectionProperty", + "com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty", + "com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty", + "com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty", + "com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty", + "com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty", + "com.mysql.jdbc.StringUtils", + "com.mysql.jdbc.CharsetMapping", + "com.mysql.jdbc.log.StandardLogger", + "org.h2.engine.SessionRemote", + "org.h2.mvstore.DataUtils", + "org.h2.message.DbException", + "org.h2.constant.ErrorCode", + "org.h2.jdbc.JdbcSQLException", + "org.h2.command.dml.SetTypes", + "org.h2.engine.ConnectionInfo", + "org.h2.engine.Database", + "org.h2.util.BitField", + "org.h2.engine.Mode", + "org.h2.store.fs.FilePath", + "org.h2.store.fs.FilePathDisk", + "org.h2.store.fs.FilePathMem", + "org.h2.store.fs.FilePathNioMem", + "org.h2.store.fs.FilePathSplit", + "org.h2.constant.DbSettings", + "org.h2.value.CompareMode", + "org.h2.store.FileLock", + "org.h2.util.SortedProperties", + "org.h2.table.Table", + "com.mysql.jdbc.StatementImpl", + "com.mysql.jdbc.PreparedStatement", + "com.mysql.jdbc.MysqlIO", + "com.mysql.jdbc.CallableStatement" + ); + } +} -- cgit 1.2.3-korg