aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterGroup.java8
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterHandler.java5
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManager.java12
-rw-r--r--main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java15
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/parameters/CommonTestData.java2
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/parameters/TestXacmlPdpParameterGroup.java38
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java10
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java8
-rw-r--r--main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java12
9 files changed, 59 insertions, 51 deletions
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterGroup.java b/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterGroup.java
index 7fde514a..b994fe9e 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterGroup.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterGroup.java
@@ -23,7 +23,7 @@ package org.onap.policy.pdpx.main.parameters;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
+import org.onap.policy.common.endpoints.parameters.RestClientParameters;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
import org.onap.policy.common.parameters.BeanValidationResult;
@@ -42,14 +42,14 @@ import org.onap.policy.models.base.Validated;
@NotNull
@NotBlank
public class XacmlPdpParameterGroup extends ParameterGroupImpl {
- private static final String PARAM_POLICY_API = "policyApiParameters";
+ public static final String PARAM_POLICY_API = "policyApiParameters";
private String pdpGroup;
private String pdpType;
@Valid
private RestServerParameters restServerParameters;
@Valid
- private BusTopicParams policyApiParameters;
+ private RestClientParameters policyApiParameters;
@Valid
private TopicParameterGroup topicParameterGroup;
@Valid
@@ -62,7 +62,7 @@ public class XacmlPdpParameterGroup extends ParameterGroupImpl {
* @param pdpGroup the pdp group name
*/
public XacmlPdpParameterGroup(final String name, final String pdpGroup, final String pdpType,
- final RestServerParameters restServerParameters, final BusTopicParams policyApiParameters,
+ final RestServerParameters restServerParameters, final RestClientParameters policyApiParameters,
final TopicParameterGroup topicParameterGroup, final XacmlApplicationParameters applicationParameters) {
super(name);
this.pdpGroup = pdpGroup;
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterHandler.java b/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterHandler.java
index 539716b8..649a642f 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterHandler.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/parameters/XacmlPdpParameterHandler.java
@@ -21,6 +21,7 @@
package org.onap.policy.pdpx.main.parameters;
import java.io.File;
+import org.onap.policy.common.endpoints.parameters.RestClientParameters;
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.common.utils.coder.StandardCoder;
@@ -68,6 +69,10 @@ public class XacmlPdpParameterHandler {
throw new PolicyXacmlPdpException(errorMessage);
}
+ RestClientParameters apiClientParams = xacmlPdpParameterGroup.getPolicyApiParameters();
+ apiClientParams.setName(XacmlPdpParameterGroup.PARAM_POLICY_API);
+ apiClientParams.setManaged(false);
+
// validate the parameters
final ValidationResult validationResult = xacmlPdpParameterGroup.validate();
if (!validationResult.isValid()) {
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManager.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManager.java
index 6cd46838..10f2046a 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManager.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManager.java
@@ -33,7 +33,7 @@ import java.util.ServiceLoader;
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.Setter;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
+import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy;
@@ -60,9 +60,9 @@ public class XacmlPdpApplicationManager {
* One time to initialize the applications upon startup.
*/
public XacmlPdpApplicationManager(XacmlApplicationParameters applicationParameters,
- BusTopicParams policyApiParameters) {
+ HttpClient policyApiClient) {
if (LOGGER.isInfoEnabled()) {
- LOGGER.info("Initialization applications {} {}", applicationParameters, policyApiParameters);
+ LOGGER.info("Initialization applications {} {}", applicationParameters, policyApiClient);
}
//
// Load service
@@ -93,7 +93,7 @@ public class XacmlPdpApplicationManager {
//
try {
initializeApplicationPath(Paths.get(applicationParameters.getApplicationPath()), application,
- policyApiParameters);
+ policyApiClient);
//
// We are initialized
//
@@ -238,7 +238,7 @@ public class XacmlPdpApplicationManager {
}
private void initializeApplicationPath(Path basePath, XacmlApplicationServiceProvider application,
- BusTopicParams policyApiParameters) throws XacmlApplicationException {
+ HttpClient policyApiClient) throws XacmlApplicationException {
//
// Making an assumption that all application names are unique, and
// they can result in a valid directory being created.
@@ -267,6 +267,6 @@ public class XacmlPdpApplicationManager {
//
// Have the application initialize
//
- application.initialize(path, policyApiParameters);
+ application.initialize(path, policyApiClient);
}
}
diff --git a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
index d3b59c4a..e74ab9bf 100644
--- a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
+++ b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
@@ -27,7 +27,11 @@ import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager;
import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient;
import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClientException;
+import org.onap.policy.common.endpoints.http.client.HttpClient;
+import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
+import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher;
+import org.onap.policy.common.endpoints.parameters.RestClientParameters;
import org.onap.policy.common.parameters.ParameterService;
import org.onap.policy.common.utils.services.ServiceManagerContainer;
import org.onap.policy.models.pdp.concepts.PdpStatus;
@@ -79,6 +83,8 @@ public class XacmlPdpActivator extends ServiceManagerContainer {
public XacmlPdpActivator(final XacmlPdpParameterGroup xacmlPdpParameterGroup) {
LOGGER.info("Activator initializing using {}", xacmlPdpParameterGroup);
+ RestClientParameters apiClientParams = xacmlPdpParameterGroup.getPolicyApiParameters();
+
TopicEndpointManager.getManager().addTopics(xacmlPdpParameterGroup.getTopicParameterGroup());
final XacmlPdpHearbeatPublisher heartbeat;
@@ -86,9 +92,10 @@ public class XacmlPdpActivator extends ServiceManagerContainer {
final XacmlState state;
try {
- var appmgr =
- new XacmlPdpApplicationManager(xacmlPdpParameterGroup.getApplicationParameters(),
- xacmlPdpParameterGroup.getPolicyApiParameters());
+ HttpClient apiClient = HttpClientFactoryInstance.getClientFactory().build(apiClientParams);
+
+ var appmgr = new XacmlPdpApplicationManager(xacmlPdpParameterGroup.getApplicationParameters(),
+ apiClient);
XacmlPdpApplicationManager.setCurrent(appmgr);
var stats = new XacmlPdpStatisticsManager();
@@ -116,7 +123,7 @@ public class XacmlPdpActivator extends ServiceManagerContainer {
restServer = new XacmlPdpRestServer(xacmlPdpParameterGroup.getRestServerParameters(),
XacmlPdpAafFilter.class, XacmlPdpRestController.class);
- } catch (RuntimeException | TopicSinkClientException e) {
+ } catch (RuntimeException | TopicSinkClientException | HttpClientConfigException e) {
throw new PolicyXacmlPdpRuntimeException(e.getMessage(), e);
}
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/parameters/CommonTestData.java b/main/src/test/java/org/onap/policy/pdpx/main/parameters/CommonTestData.java
index 21475da8..e4352181 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/parameters/CommonTestData.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/parameters/CommonTestData.java
@@ -37,6 +37,7 @@ import org.onap.policy.common.utils.coder.StandardCoder;
*/
public class CommonTestData {
+ private static final String CLIENT_NAME = "clientName";
private static final String PASS_KEY = "password";
private static final String USER_KEY = "userName";
private static final String PORT_KEY = "port";
@@ -143,6 +144,7 @@ public class CommonTestData {
*/
public Map<String, Object> getPolicyApiParametersMap(final boolean isEmpty) {
final Map<String, Object> map = new TreeMap<>();
+ map.put(CLIENT_NAME, XacmlPdpParameterGroup.PARAM_POLICY_API);
map.put(HTTPS_KEY, POLICY_API_HTTPS);
map.put(AAF_KEY, POLICY_API_AAF);
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/parameters/TestXacmlPdpParameterGroup.java b/main/src/test/java/org/onap/policy/pdpx/main/parameters/TestXacmlPdpParameterGroup.java
index cb9825cc..a9f3f12d 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/parameters/TestXacmlPdpParameterGroup.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/parameters/TestXacmlPdpParameterGroup.java
@@ -33,7 +33,7 @@ import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
+import org.onap.policy.common.endpoints.parameters.RestClientParameters;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
import org.onap.policy.common.parameters.ValidationResult;
@@ -59,8 +59,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup() throws IOException {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -88,8 +88,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_NullParameterGroupName() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -107,8 +107,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_EmptyParameterGroupName() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -127,8 +127,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_NullPdpGroup() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -147,8 +147,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_EmptyPdpGroup() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -167,8 +167,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_EmptyRestServerParameters() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(true), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -187,8 +187,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_EmptyPolicyApiParameters() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(true), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(true), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -207,8 +207,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_EmptyTopicParameterGroup() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(true), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -227,8 +227,8 @@ public class TestXacmlPdpParameterGroup {
public void testXacmlPdpParameterGroup_EmptyApplicationParameterGroup() {
final RestServerParameters restServerParameters =
testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
- final BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ final RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
final TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java
index 54d7432f..8d80b832 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java
@@ -47,10 +47,10 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
import org.onap.policy.common.endpoints.http.client.internal.JerseyClient;
+import org.onap.policy.common.endpoints.parameters.RestClientParameters;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
import org.onap.policy.common.utils.coder.CoderException;
@@ -85,7 +85,7 @@ public class TestAbbreviateDecisionResults {
private static File propertiesFile;
private static XacmlApplicationServiceProvider service;
- private static BusTopicParams policyApiParameters;
+ private static RestClientParameters policyApiParameters;
@ClassRule
public static final TemporaryFolder appsFolder = new TemporaryFolder();
@@ -117,7 +117,7 @@ public class TestAbbreviateDecisionResults {
// Create parameters for XacmlPdPService
RestServerParameters rest = testData.toObject(testData.getRestServerParametersMap(port),
RestServerParameters.class);
- policyApiParameters = testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ policyApiParameters = testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
TopicParameterGroup topicParameterGroup = testData.toObject(testData.getTopicParametersMap(false),
TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -219,7 +219,7 @@ public class TestAbbreviateDecisionResults {
*/
private static HttpClient getNoAuthHttpClient()
throws HttpClientConfigException, KeyManagementException, NoSuchAlgorithmException, ClassNotFoundException {
- BusTopicParams clientParams = new BusTopicParams();
+ RestClientParameters clientParams = new RestClientParameters();
clientParams.setClientName("testName");
clientParams.setUseHttps(false);
clientParams.setAllowSelfSignedCerts(false);
@@ -289,6 +289,6 @@ public class TestAbbreviateDecisionResults {
// Tell it to initialize based on the properties file
// we just built for it.
//
- service.initialize(propertiesFile.toPath().getParent(), policyApiParameters);
+ service.initialize(propertiesFile.toPath().getParent(), null);
}
}
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java
index 5f6a2796..77e8873f 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java
@@ -46,10 +46,10 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.endpoints.http.client.HttpClient;
import org.onap.policy.common.endpoints.http.client.HttpClientConfigException;
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
+import org.onap.policy.common.endpoints.parameters.RestClientParameters;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
import org.onap.policy.common.utils.network.NetworkUtil;
@@ -105,8 +105,8 @@ public class TestDecision {
//
RestServerParameters rest =
testData.toObject(testData.getRestServerParametersMap(port), RestServerParameters.class);
- BusTopicParams policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
+ RestClientParameters policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), RestClientParameters.class);
TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
final XacmlApplicationParameters xacmlApplicationParameters =
@@ -245,7 +245,7 @@ public class TestDecision {
}
private static HttpClient getNoAuthHttpClient() throws HttpClientConfigException {
- return HttpClientFactoryInstance.getClientFactory().build(BusTopicParams.builder()
+ return HttpClientFactoryInstance.getClientFactory().build(RestClientParameters.builder()
.clientName("testDecisionClient")
.useHttps(false).allowSelfSignedCerts(false).hostname("localhost").port(port)
.basePath("policy/pdpx/v1")
diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java
index c79ebb52..036d4e35 100644
--- a/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java
+++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/XacmlPdpApplicationManagerTest.java
@@ -35,7 +35,6 @@ import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
-import org.onap.policy.common.endpoints.event.comm.bus.internal.BusTopicParams;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardYamlCoder;
import org.onap.policy.common.utils.resources.ResourceUtils;
@@ -54,7 +53,6 @@ import org.slf4j.LoggerFactory;
public class XacmlPdpApplicationManagerTest {
private static final Logger LOGGER = LoggerFactory.getLogger(XacmlPdpApplicationManagerTest.class);
private static final StandardYamlCoder yamlCoder = new StandardYamlCoder();
- private static final BusTopicParams params = new BusTopicParams();
private static Path appsDirectory;
private static ToscaServiceTemplate completedJtst;
private static CommonTestData testData = new CommonTestData();
@@ -70,10 +68,6 @@ public class XacmlPdpApplicationManagerTest {
@BeforeClass
public static void setupTestEnvironment() throws Exception {
//
- // No need to do more than this
- //
- params.setClientName("policyApiParameters");
- //
// Load an example policy
//
String policyYaml = ResourceUtils
@@ -121,7 +115,7 @@ public class XacmlPdpApplicationManagerTest {
//
// Create our app manager
//
- XacmlPdpApplicationManager manager = new XacmlPdpApplicationManager(xacmlApplicationParameters, params);
+ XacmlPdpApplicationManager manager = new XacmlPdpApplicationManager(xacmlApplicationParameters, null);
//
// Still creates the manager, but the apps were not able to initialize
//
@@ -131,7 +125,7 @@ public class XacmlPdpApplicationManagerTest {
// Now create the directory
//
Files.createDirectory(nonExistentPath);
- manager = new XacmlPdpApplicationManager(xacmlApplicationParameters, params);
+ manager = new XacmlPdpApplicationManager(xacmlApplicationParameters, null);
//
// Now it should have initialized the apps
//
@@ -146,7 +140,7 @@ public class XacmlPdpApplicationManagerTest {
final XacmlApplicationParameters xacmlApplicationParameters =
testData.toObject(testData.getXacmlapplicationParametersMap(false,
appsDirectory.toString(), exclusions), XacmlApplicationParameters.class);
- XacmlPdpApplicationManager manager = new XacmlPdpApplicationManager(xacmlApplicationParameters, params);
+ XacmlPdpApplicationManager manager = new XacmlPdpApplicationManager(xacmlApplicationParameters, null);
//
// Test the basics from the startup
//