<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${version.derby}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
package org.onap.policy.apex.examples.aadm;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class AadmDbWriteTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, new TestAadmModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class AadmModelTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, new TestAadmModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
<artifactId>commons-math3</artifactId>
<version>3.2</version>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${version.derby}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
package org.onap.policy.apex.examples.adaptive;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class AnomalyDetectionDbWriteTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<>(AxPolicyModel.class, new TestAnomalyDetectionModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class AnomalyDetectionModelTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<>(AxPolicyModel.class, new TestAnomalyDetectionModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
package org.onap.policy.apex.examples.adaptive;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class AutoLearnDbWriteTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<>(AxPolicyModel.class, new TestAutoLearnModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class AutoLearnModelTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<>(AxPolicyModel.class, new TestAutoLearnModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${version.derby}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
* @author John Keeney (john.keeney@ericsson.com)
*/
public class MfpModelTest {
-
- private static Connection connection;
private static TestApexModel<AxPolicyModel> testApexModel1;
private static TestApexModel<AxPolicyModel> testApexModel2;
*/
@BeforeClass
public static void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
testApexModel1 = new TestApexModel<>(AxPolicyModel.class, new TestMfpModelCreator.TestMfp1ModelCreator());
testApexModel2 = new TestApexModel<>(AxPolicyModel.class, new TestMfpModelCreator.TestMfp2ModelCreator());
}
- /**
- * Teardown.
- *
- * @throws Exception if there is an error
- */
- @AfterClass
- public static void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
/**
* Test model is valid.
*
<class>org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${version.derby}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<artifactId>plugins-executor-javascript</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>integration-common</artifactId>
<name>${project.artifactId}</name>
<description>Specific source code and other artifacts for Apex example applications.</description>
-
<modules>
<module>examples-myfirstpolicy</module>
<module>examples-aadm</module>
<module>examples-servlet</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<profiles>
<profile>
<id>apexSite</id>
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import java.util.UUID;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
* JUnit test class.
*/
public class EntityTest {
- private Connection connection;
private ApexDao apexDao;
- @Before
- public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
- }
-
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testEntityTestSanity() throws ApexException {
final DaoParameters daoParameters = new DaoParameters();
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
public class SupportApexBasicModelTester {
- private Connection connection;
TestApexModel<AxModel> testApexModel;
/**
* Set up the test.
- *
+ *
* @throws Exception any exception thrown by the test
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxModel>(AxModel.class, new DummyApexBasicModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.basicmodel.concepts.DummyEntity</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database"/>
<property name="eclipselink.logging.level" value="INFO" />
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
/**
* Apex context model tests.
- *
+ *
* @author liam
*
*/
public class ApexContextModelTest {
- private Connection connection;
TestApexModel<AxContextModel> testApexModel;
/**
* Set up tests.
- *
+ *
* @throws Exception a testing exception
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxContextModel>(AxContextModel.class, new TestApexContextModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.contextmodel.concepts.AxContextModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel;
public class ApexEngineModelTest {
- private Connection connection;
TestApexModel<AxEngineModel> testApexModel;
/**
* Set up the test.
- *
+ *
* @throws Exception errors from test setup
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxEngineModel>(AxEngineModel.class, new DummyTestApexEngineModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.enginemodel.concepts.AxEngineStats</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.eventmodel.concepts.AxEventModel;
public class ApexEventModelTest {
- private Connection connection;
TestApexModel<AxEventModel> testApexModel;
/**
* Set up the test.
- *
+ *
* @throws Exception exceptions from the test
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxEventModel>(AxEventModel.class, new DummyTestApexEventModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.eventmodel.concepts.AxEventModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
+ // Hold the h2 database up for entire tests
+ connection = DriverManager.getConnection("jdbc:h2:mem:testdb");
}
@After
public void teardown() throws Exception {
+ // Close the h2 database after tests
connection.close();
- new File("derby.log").delete();
}
@Test
<class>org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
- <property name="eclipselink.ddl-generation" value="create-tables" />
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
+ <property name="eclipselink.ddl-generation" value="create-or-extend-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
</properties>
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
public class ApexPolicyModelTest {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
* Set up the policy model tests.
- *
+ *
* @throws Exception on setup errors
*/
@Before
public void setup() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, new SupportApexPolicyModelCreator());
}
- @After
- public void teardown() throws Exception {
- connection.close();
- new File("derby.log").delete();
- }
-
@Test
public void testModelValid() throws Exception {
final AxValidationResult result = testApexModel.testApexModelValid();
<class>org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
<name>${project.artifactId}</name>
<description>The model for Apex, it comtains definitions of all Apex concepts and also has handling for Apex models.</description>
- <dependencies>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${version.derby}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<modules>
<module>utilities</module>
<module>basic-model</module>
<module>model-api</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<profiles>
<profile>
<id>apexSite</id>
<artifactId>plugins-persistence-jpa-eclipselink</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.plugins.plugins-persistence.plugins-persistence-jpa</groupId>
- <artifactId>plugins-persistence-jpa-hibernate</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- Plugins for event carrier technologies -->
<dependency>
</dependency>
<!-- Test Data used by examples -->
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>integration-common</artifactId>
<artifactId>hazelcast</artifactId>
<version>${version.hazelcast}</version>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<profiles>
</exclusion>
</exclusions>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<profiles>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.onap.policy.apex.context.test.entities.ArtifactKeyTestEntity;
-import org.onap.policy.apex.context.test.entities.ReferenceKeyTestEntity;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
+import org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities.ArtifactKeyTestEntity;
+import org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities.ReferenceKeyTestEntity;
/**
* Junit tests for class EclipselinkApexDao.
- *
+ *
* @author Dinh Danh Le (dinh.danh.le@ericsson.com)
*
*/
/**
* Setup the tests.
- *
+ *
* @throws ApexException Exceptions from test setup
*/
@Before
new AxReferenceKey(owner0Key, "Entity02"),
new AxReferenceKey(owner0Key, "Entity03")
});
-
+
// prepare 2 more AxReferenceKeys corresponding to owner1Key
final AxReferenceKey refKey11 = new AxReferenceKey(owner1Key, "Entity11");
final AxReferenceKey refKey12 = new AxReferenceKey(owner1Key, "Entity12");
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+
+/**
+ * The Class ArtifactKeyTestEntity is an entity for testing artifact keys.
+ */
+@Entity
+@Table(name = "ArtifactKeyTestEntity")
+public class ArtifactKeyTestEntity extends AxConcept {
+ private static final long serialVersionUID = -2962570563281067896L;
+
+ @EmbeddedId()
+ @XmlElement(name = "key", required = true)
+ protected AxArtifactKey key;
+
+ private double doubleValue;
+
+ /**
+ * Instantiates a new artifact key test entity.
+ */
+ public ArtifactKeyTestEntity() {
+ this.key = new AxArtifactKey();
+ this.doubleValue = 0;
+ }
+
+ /**
+ * Instantiates a new artifact key test entity.
+ *
+ * @param doubleValue the double value
+ */
+ public ArtifactKeyTestEntity(final Double doubleValue) {
+ this.key = new AxArtifactKey();
+ this.doubleValue = doubleValue;
+ }
+
+ /**
+ * Instantiates a new artifact key test entity.
+ *
+ * @param key the key
+ * @param doubleValue the double value
+ */
+ public ArtifactKeyTestEntity(final AxArtifactKey key, final Double doubleValue) {
+ this.key = key;
+ this.doubleValue = doubleValue;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+ */
+ @Override
+ public AxArtifactKey getKey() {
+ return key;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ */
+ @Override
+ public List<AxKey> getKeys() {
+ return Arrays.asList((AxKey) getKey());
+ }
+
+ /**
+ * Sets the key.
+ *
+ * @param key the new key
+ */
+ public void setKey(final AxArtifactKey key) {
+ this.key = key;
+ }
+
+ /**
+ * Check set key.
+ *
+ * @return true, if successful
+ */
+ public boolean checkSetKey() {
+ return (this.key != null);
+ }
+
+ /**
+ * Gets the double value.
+ *
+ * @return the double value
+ */
+ public double getDoubleValue() {
+ return doubleValue;
+ }
+
+ /**
+ * Sets the double value.
+ *
+ * @param doubleValue the new double value
+ */
+ public void setDoubleValue(final double doubleValue) {
+ this.doubleValue = doubleValue;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+ * AxValidationResult)
+ */
+ @Override
+ public AxValidationResult validate(final AxValidationResult result) {
+ return key.validate(result);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+ */
+ @Override
+ public void clean() {
+ key.clean();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+ */
+ @Override
+ public String toString() {
+ return "ArtifactKeyTestEntity [key=" + key + ", doubleValue=" + doubleValue + "]";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+ * AxConcept)
+ */
+ @Override
+ public AxConcept copyTo(final AxConcept target) {
+ final Object copyObject = ((target == null) ? new ArtifactKeyTestEntity() : target);
+ if (copyObject instanceof ArtifactKeyTestEntity) {
+ final ArtifactKeyTestEntity copy = ((ArtifactKeyTestEntity) copyObject);
+ if (this.checkSetKey()) {
+ copy.setKey(new AxArtifactKey(key));
+ } else {
+ copy.key = null;
+ }
+ copy.doubleValue = doubleValue;
+ return copy;
+ } else {
+ return null;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (this == obj) {
+ return true;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final ArtifactKeyTestEntity other = (ArtifactKeyTestEntity) obj;
+ if (key == null) {
+ if (other.key != null) {
+ return false;
+ }
+ } else if (!key.equals(other.key)) {
+ return false;
+ }
+ return (Double.compare(doubleValue, other.doubleValue) == 0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo(final AxConcept otherObj) {
+ if (otherObj == null) {
+ return -1;
+ }
+ if (this == otherObj) {
+ return 0;
+ }
+ if (getClass() != otherObj.getClass()) {
+ return -1;
+ }
+ final ArtifactKeyTestEntity other = (ArtifactKeyTestEntity) otherObj;
+ if (key == null) {
+ if (other.key != null) {
+ return 1;
+ }
+ } else if (!key.equals(other.key)) {
+ return key.compareTo(other.key);
+ }
+ return Double.compare(doubleValue, other.doubleValue);
+ }
+}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.onap.policy.apex.model.basicmodel.concepts.AxConcept;
+import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
+
+/**
+ * The Class ReferenceKeyTestEntity provides a reference key test concept.
+ */
+@Entity
+@Table(name = "ReferenceKeyTestEntity")
+public class ReferenceKeyTestEntity extends AxConcept {
+ private static final long serialVersionUID = -2962570563281067895L;
+
+ @EmbeddedId()
+ @XmlElement(name = "key", required = true)
+ @XmlJavaTypeAdapter(AxReferenceKeyAdapter.class)
+ protected AxReferenceKey key;
+
+ private double doubleValue;
+
+ /**
+ * Instantiates a new reference key test entity.
+ */
+ public ReferenceKeyTestEntity() {
+ this.key = new AxReferenceKey();
+ this.doubleValue = 0;
+ }
+
+ /**
+ * Instantiates a new reference key test entity.
+ *
+ * @param doubleValue the double value
+ */
+ public ReferenceKeyTestEntity(final Double doubleValue) {
+ this.key = new AxReferenceKey();
+ this.doubleValue = doubleValue;
+ }
+
+ /**
+ * Instantiates a new reference key test entity.
+ *
+ * @param key the key
+ * @param doubleValue the double value
+ */
+ public ReferenceKeyTestEntity(final AxReferenceKey key, final Double doubleValue) {
+ this.key = key;
+ this.doubleValue = doubleValue;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKey()
+ */
+ @Override
+ public AxReferenceKey getKey() {
+ return key;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#getKeys()
+ */
+ @Override
+ public List<AxKey> getKeys() {
+ return Arrays.asList((AxKey) getKey());
+ }
+
+ /**
+ * Sets the key.
+ *
+ * @param key the new key
+ */
+ public void setKey(final AxReferenceKey key) {
+ this.key = key;
+ }
+
+ /**
+ * Check set key.
+ *
+ * @return true, if successful
+ */
+ public boolean checkSetKey() {
+ return (this.key != null);
+ }
+
+ /**
+ * Gets the double value.
+ *
+ * @return the double value
+ */
+ public double getDoubleValue() {
+ return doubleValue;
+ }
+
+ /**
+ * Sets the double value.
+ *
+ * @param doubleValue the new double value
+ */
+ public void setDoubleValue(final double doubleValue) {
+ this.doubleValue = doubleValue;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#validate(org.onap.policy.apex.model.basicmodel.concepts.
+ * AxValidationResult)
+ */
+ @Override
+ public AxValidationResult validate(final AxValidationResult result) {
+ return key.validate(result);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#clean()
+ */
+ @Override
+ public void clean() {
+ key.clean();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#toString()
+ */
+ @Override
+ public String toString() {
+ return "ReferenceKeyTestEntity [key=" + key + ", doubleValue=" + doubleValue + "]";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.onap.policy.apex.model.basicmodel.concepts.AxConcept#copyTo(org.onap.policy.apex.model.basicmodel.concepts.
+ * AxConcept)
+ */
+ @Override
+ public AxConcept copyTo(final AxConcept target) {
+ final Object copyObject = ((target == null) ? new ReferenceKeyTestEntity() : target);
+ if (copyObject instanceof ReferenceKeyTestEntity) {
+ final ReferenceKeyTestEntity copy = ((ReferenceKeyTestEntity) copyObject);
+ if (this.checkSetKey()) {
+ copy.setKey(new AxReferenceKey(key));
+ } else {
+ copy.key = null;
+ }
+ copy.doubleValue = doubleValue;
+ return copy;
+ } else {
+ return null;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
+ return result;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.model.basicmodel.concepts.AxConcept#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (this == obj) {
+ return true;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final ReferenceKeyTestEntity other = (ReferenceKeyTestEntity) obj;
+ if (key == null) {
+ if (other.key != null) {
+ return false;
+ }
+ } else if (!key.equals(other.key)) {
+ return false;
+ }
+ return (Double.compare(doubleValue, other.doubleValue) == 0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo(final AxConcept otherObj) {
+ if (otherObj == null) {
+ return -1;
+ }
+ if (this == otherObj) {
+ return 0;
+ }
+ if (getClass() != otherObj.getClass()) {
+ return -1;
+ }
+ final ReferenceKeyTestEntity other = (ReferenceKeyTestEntity) otherObj;
+ if (key == null) {
+ if (other.key != null) {
+ return 1;
+ }
+ } else if (!key.equals(other.key)) {
+ return key.compareTo(other.key);
+ }
+ return Double.compare(doubleValue, other.doubleValue);
+ }
+}
--- /dev/null
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+/**
+ * Contains common test entities.
+ */
+package org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities;
<persistence-unit name="DAOTest" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.onap.policy.apex.context.test.entities.ReferenceKeyTestEntity</class>
- <class>org.onap.policy.apex.context.test.entities.ArtifactKeyTestEntity</class>
+ <class>org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities.ReferenceKeyTestEntity</class>
+ <class>org.onap.policy.apex.plugins.persistence.jpa.eclipselink.entities.ArtifactKeyTestEntity</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<artifactId>basic-model</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<properties>
<encoding>UTF-8</encoding>
<file.encoding>UTF-8</file.encoding>
- <version.derby>10.13.1.1</version.derby>
<version.commons-cli>1.4</version.commons-cli>
<version.kafka>1.1.1</version.kafka>
<version.jersey>2.26</version.jersey>
<artifactId>core-protocols</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
import java.util.Calendar;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
import java.util.Locale;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
import java.util.TimeZone;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
import java.util.Arrays;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
import java.io.Serializable;
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-package org.onap.policy.apex.testsuites.integration.context.concepts;
+package org.onap.policy.apex.context.test.concepts;
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
+ <artifactId>integration-common</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-distribution</groupId>
<artifactId>plugins-context-distribution-hazelcast</artifactId>
import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.DistributorParameters;
import org.onap.policy.apex.context.parameters.SchemaParameters;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.onap.policy.apex.core.infrastructure.messaging.util.MessagingUtils;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManager;
import org.onap.policy.apex.plugins.context.locking.curator.CuratorLockManagerParameters;
import org.onap.policy.apex.plugins.context.locking.hazelcast.HazelcastLockManager;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
import org.onap.policy.apex.testsuites.integration.context.lock.modifier.LockType;
import org.onap.policy.apex.testsuites.integration.context.locking.ConcurrentContext;
import org.onap.policy.apex.testsuites.integration.context.utils.ConfigrationProvider;
import org.onap.policy.apex.context.ContextRuntimeException;
import org.onap.policy.apex.context.Distributor;
import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextBooleanItem;
+import org.onap.policy.apex.context.test.concepts.TestContextByteItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateTzItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDoubleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextFloatItem;
+import org.onap.policy.apex.context.test.concepts.TestContextIntItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongObjectItem;
+import org.onap.policy.apex.context.test.concepts.TestContextStringItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeSetItem;
+import org.onap.policy.apex.context.test.concepts.TestExternalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestGlobalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextBooleanItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextByteItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateLocaleItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateTzItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDoubleItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextFloatItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextIntItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongObjectItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextStringItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextTreeMapItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextTreeSetItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestExternalContextItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestGlobalContextItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestPolicyContextItem;
import org.onap.policy.apex.testsuites.integration.context.factory.TestContextAlbumFactory;
import org.onap.policy.apex.testsuites.integration.context.utils.Constants;
import org.slf4j.ext.XLogger;
import org.onap.policy.apex.context.ContextRuntimeException;
import org.onap.policy.apex.context.Distributor;
import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateLocaleItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextTreeMapItem;
import org.onap.policy.apex.testsuites.integration.context.factory.TestContextAlbumFactory;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.plugins.context.distribution.hazelcast;
+package org.onap.policy.apex.testsuites.integration.context.distribution;
import java.io.IOException;
import org.onap.policy.apex.context.parameters.ContextParameterConstants;
import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.SchemaParameters;
-import org.onap.policy.apex.context.test.distribution.ContextAlbumUpdate;
-import org.onap.policy.apex.context.test.distribution.ContextInstantiation;
-import org.onap.policy.apex.context.test.distribution.ContextUpdate;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.plugins.context.distribution.hazelcast.HazelcastContextDistributor;
import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
ParameterService.register(contextParameters.getDistributorParameters());
ParameterService.register(contextParameters.getLockManagerParameters());
ParameterService.register(contextParameters.getPersistorParameters());
-
+
schemaParameters = new SchemaParameters();
schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters());
ParameterService.deregister(contextParameters.getPersistorParameters());
ParameterService.deregister(contextParameters);
}
-
+
/**
* Test context album update hazelcast.
*
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.apex.plugins.context.distribution.infinispan;
+package org.onap.policy.apex.testsuites.integration.context.distribution;
import java.io.IOException;
import org.onap.policy.apex.context.parameters.ContextParameterConstants;
import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.SchemaParameters;
-import org.onap.policy.apex.context.test.distribution.ContextAlbumUpdate;
-import org.onap.policy.apex.context.test.distribution.ContextInstantiation;
-import org.onap.policy.apex.context.test.distribution.ContextUpdate;
-import org.onap.policy.apex.context.test.distribution.SequentialContextInstantiation;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanContextDistributor;
+import org.onap.policy.apex.plugins.context.distribution.infinispan.InfinispanDistributorParameters;
import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
ParameterService.register(contextParameters.getDistributorParameters());
ParameterService.register(contextParameters.getLockManagerParameters());
ParameterService.register(contextParameters.getPersistorParameters());
-
+
schemaParameters = new SchemaParameters();
schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters());
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.context.Distributor;
import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextBooleanItem;
+import org.onap.policy.apex.context.test.concepts.TestContextByteItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDateTzItem;
+import org.onap.policy.apex.context.test.concepts.TestContextDoubleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextFloatItem;
+import org.onap.policy.apex.context.test.concepts.TestContextIntItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongObjectItem;
+import org.onap.policy.apex.context.test.concepts.TestContextStringItem;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextBooleanItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextByteItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateLocaleItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateTzItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDoubleItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextFloatItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextIntItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongObjectItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextStringItem;
import org.onap.policy.apex.testsuites.integration.context.utils.Constants;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.POLICY_CONTEXT_ALBUM;
import static org.onap.policy.apex.testsuites.integration.context.utils.Constants.VERSION;
+import org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem;
+import org.onap.policy.apex.context.test.concepts.TestExternalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestGlobalContextItem;
+import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextDateLocaleItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextTreeMapItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestExternalContextItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestGlobalContextItem;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestPolicyContextItem;
/**
* The Class TestContextAlbumFactory creates test context albums.
import java.util.Random;
import org.onap.policy.apex.context.ContextAlbum;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.context.ContextException;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.context.Distributor;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
import org.onap.policy.apex.testsuites.integration.context.utils.ConfigrationProvider;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
import org.onap.policy.apex.context.ContextRuntimeException;
import org.onap.policy.apex.context.Distributor;
import org.onap.policy.apex.context.impl.distribution.DistributorFactory;
+import org.onap.policy.apex.context.test.concepts.TestContextLongItem;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextModel;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestContextLongItem;
import org.onap.policy.apex.testsuites.integration.context.factory.TestContextAlbumFactory;
import org.onap.policy.apex.testsuites.integration.context.lock.modifier.AlbumModifier;
import org.onap.policy.apex.testsuites.integration.context.lock.modifier.LockType;
import java.util.TimeZone;
+import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.testsuites.integration.context.concepts.TestPolicyContextItem;
/**
* The Class Constants provides constants for context tests.
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
<artifactId>integration-common</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>${version.derby}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<profiles>
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
import java.sql.Connection;
import java.sql.DriverManager;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
* The Class TestApexSamplePolicyDbWrite.
*/
public class TestApexSamplePolicyDbWrite {
- private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
final TestApexSamplePolicyModelCreator apexPolicyModelCreator = new TestApexSamplePolicyModelCreator("MVEL");
testApexModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, apexPolicyModelCreator);
}
- /**
- * Teardown.
- *
- * @throws Exception the exception
- */
- @After
- public void teardown() throws Exception {
- connection.close();
- }
-
/**
* Test model write read jpa.
*
DaoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName());
DaoParameters.setPersistenceUnit("SampleModelTest");
+ Connection connection = DriverManager.getConnection("jdbc:h2:mem:testdb");
testApexModel.testApexModelWriteReadJpa(DaoParameters);
+ connection.close();
}
}
* 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.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
import java.sql.Connection;
import java.sql.DriverManager;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
*/
public class TestApexSamplePolicyModel {
private static final String VALID_MODEL_STRING = "***validation of model successful***";
- private Connection connection;
private TestApexModel<AxPolicyModel> testApexModel;
/**
*/
@Before
public void setup() throws Exception {
- connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
-
testApexModel =
new TestApexModel<AxPolicyModel>(AxPolicyModel.class, new TestApexSamplePolicyModelCreator("MVEL"));
}
- /**
- * Teardown.
- *
- * @throws Exception the exception
- */
- @After
- public void teardown() throws Exception {
- connection.close();
- }
-
/**
* Test model valid.
*
DaoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName());
DaoParameters.setPersistenceUnit("SampleModelTest");
+ Connection connection = DriverManager.getConnection("jdbc:h2:mem:testdb");
testApexModel.testApexModelWriteReadJpa(DaoParameters);
+ connection.close();
}
-
+
}
<class>org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel</class>
<properties>
- <property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:apex_test" />
- <property name="javax.persistence.target-database" value="Derby" />
- <property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
-
+ <property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:testdb" />
+ <property name="javax.persistence.jdbc.driver" value="org.h2.Driver" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.logging.level" value="INFO" />
<artifactId>core-deployment</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.onap.policy.apex-pdp.plugins.plugins-context.plugins-context-schema</groupId>
<artifactId>plugins-context-schema-avro</artifactId>
<module>integration-uservice-test</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
<profiles>
<profile>
<id>apexAll</id>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.onap.policy.apex-pdp.context</groupId>
- <artifactId>context-test-utils</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>