diff --git a/policy-endpoints/pom.xml b/policy-endpoints/pom.xml
index bccde3e..831abff 100644
--- a/policy-endpoints/pom.xml
+++ b/policy-endpoints/pom.xml
@@ -64,6 +64,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.onap.policy.common</groupId>
+            <artifactId>common-parameters</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
             <groupId>com.att.nsa</groupId>
             <artifactId>cambriaClient</artifactId>
             <exclusions>
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java
new file mode 100644
index 0000000..85f1f45
--- /dev/null
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/RestServerParameters.java
@@ -0,0 +1,52 @@
+/*-
+ * ============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.common.endpoints.parameters;
+
+import lombok.Getter;
+
+import org.onap.policy.common.parameters.ParameterGroupImpl;
+import org.onap.policy.common.parameters.annotations.Min;
+import org.onap.policy.common.parameters.annotations.NotBlank;
+import org.onap.policy.common.parameters.annotations.NotNull;
+
+/**
+ * Class to hold all parameters needed for rest server.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+@NotNull
+@NotBlank
+@Getter
+public class RestServerParameters extends ParameterGroupImpl {
+    private String host;
+
+    @Min(value = 1)
+    private int port;
+
+    private String userName;
+    private String password;
+    private boolean https;
+    private boolean aaf;
+
+    public RestServerParameters() {
+        super(RestServerParameters.class.getSimpleName());
+    }
+}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/TopicParameterGroup.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/TopicParameterGroup.java
new file mode 100644
index 0000000..3cc2503
--- /dev/null
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/TopicParameterGroup.java
@@ -0,0 +1,47 @@
+/*-
+ * ============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.common.endpoints.parameters;
+
+import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
+import org.onap.policy.common.parameters.ParameterGroupImpl;
+import org.onap.policy.common.parameters.annotations.NotBlank;
+import org.onap.policy.common.parameters.annotations.NotNull;
+
+/**
+ * Class to hold all parameters needed for topic properties.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+@NotNull
+@NotBlank
+@Getter
+@Setter
+public class TopicParameterGroup extends ParameterGroupImpl {
+
+    private List<TopicParameters> topicSources;
+    private List<TopicParameters> topicSinks;
+
+    public TopicParameterGroup() {
+        super(TopicParameterGroup.class.getSimpleName());
+    }
+}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/TopicParameters.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/TopicParameters.java
new file mode 100644
index 0000000..82c75d3
--- /dev/null
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/parameters/TopicParameters.java
@@ -0,0 +1,44 @@
+/*-
+ * ============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.common.endpoints.parameters;
+
+import java.util.List;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.Setter;
+import org.onap.policy.common.parameters.annotations.NotBlank;
+import org.onap.policy.common.parameters.annotations.NotNull;
+
+/**
+ * Class to hold topic details such as name, server and topicCommInfrastructure.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+@NotNull
+@NotBlank
+@Getter
+@Setter
+@EqualsAndHashCode
+public class TopicParameters {
+    private String topic;
+    private List<String> servers;
+    private String topicCommInfrastructure;
+}
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java
new file mode 100644
index 0000000..9e7c69a
--- /dev/null
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/utils/ParameterUtils.java
@@ -0,0 +1,77 @@
+/*-
+ * ============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.common.endpoints.utils;
+
+import java.util.List;
+import java.util.Properties;
+
+import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
+import org.onap.policy.common.endpoints.parameters.TopicParameters;
+
+/**
+ * This is common utility class with utility methods for parameters.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+public abstract class ParameterUtils {
+
+    /**
+     * Private constructor used to prevent sub class instantiation.
+     */
+    private ParameterUtils() {
+        // Prevent construction of this class
+    }
+
+    /**
+     * Create topic properties object from the parameters.
+     *
+     * @param topicParameters the topic parameters read from config file
+     * @return the topic properties object
+     */
+    public static Properties getTopicProperties(TopicParameterGroup topicParameters) {
+        Properties topicProperties = new Properties();
+        List<TopicParameters> topicSources = topicParameters.getTopicSources();
+        List<TopicParameters> topicSinks = topicParameters.getTopicSinks();
+
+        // for each topicCommInfrastructure, there could be multiple topics (specified as comma separated string)
+        // for each such topics, there could be multiple servers (specified as comma separated string)
+        for (TopicParameters source : topicSources) {
+            addTopicProperties(topicProperties, ".source.topics", source);
+        }
+        for (TopicParameters sink : topicSinks) {
+            addTopicProperties(topicProperties, ".sink.topics", sink);
+        }
+
+        return topicProperties;
+    }
+
+    private static void addTopicProperties(Properties topicProperties, String keyName, TopicParameters topicParameter) {
+        String propKey = topicParameter.getTopicCommInfrastructure() + keyName;
+        if (topicProperties.containsKey(propKey)) {
+            topicProperties.setProperty(propKey,
+                    topicProperties.getProperty(propKey) + "," + topicParameter.getTopic());
+        } else {
+            topicProperties.setProperty(propKey, topicParameter.getTopic());
+        }
+        topicProperties.setProperty(propKey + "." + topicParameter.getTopic() + ".servers",
+                String.join(",", topicParameter.getServers()));
+    }
+}
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/CommonTestData.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/CommonTestData.java
new file mode 100644
index 0000000..80d1e86
--- /dev/null
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/CommonTestData.java
@@ -0,0 +1,139 @@
+/*-
+ * ============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.common.endpoints.parameters;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.utils.coder.Coder;
+import org.onap.policy.common.utils.coder.CoderException;
+import org.onap.policy.common.utils.coder.StandardCoder;
+
+/**
+ * Class to hold/create all parameters for test cases.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+public class CommonTestData {
+
+    public static final String REST_SERVER_PASSWORD = "zb!XztG34";
+    public static final String REST_SERVER_USER = "healthcheck";
+    public static final int REST_SERVER_PORT = 6969;
+    public static final String REST_SERVER_HOST = "0.0.0.0";
+    public static final boolean REST_SERVER_HTTPS = true;
+    public static final boolean REST_SERVER_AAF = false;
+
+    public static final String TOPIC_NAME = "POLICY-PDP-PAP";
+    public static final String TOPIC_INFRA = "dmaap";
+    public static final String TOPIC_SERVER = "message-router";
+    public static final List<TopicParameters> TOPIC_PARAMS =
+        Arrays.asList(getTopicParameters(TOPIC_NAME, TOPIC_INFRA, TOPIC_SERVER));
+    public static final Coder coder = new StandardCoder();
+
+    /**
+     * Create topic parameters for test cases.
+     *
+     * @param topicName name of topic
+     * @param topicInfra topicCommInfrastructure
+     * @param topicServer topic server
+     *
+     * @return topic parameters
+     */
+    public static TopicParameters getTopicParameters(String topicName, String topicInfra, String topicServer) {
+        final TopicParameters topicParams = new TopicParameters();
+        topicParams.setTopic(topicName);
+        topicParams.setTopicCommInfrastructure(topicInfra);
+        topicParams.setServers(Arrays.asList(topicServer));
+        return topicParams;
+    }
+
+    /**
+     * Converts the contents of a map to a parameter class.
+     *
+     * @param source property map
+     * @param clazz class of object to be created from the map
+     * @return a new object represented by the map
+     */
+    public <T extends ParameterGroup> T toObject(final Map<String, Object> source, final Class<T> clazz) {
+        try {
+            return coder.decode(coder.encode(source), clazz);
+
+        } catch (final CoderException e) {
+            throw new RuntimeException("cannot create " + clazz.getName() + " from map", e);
+        }
+    }
+
+    /**
+     * Returns a property map for a RestServerParameters map for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return a property map suitable for constructing an object
+     */
+    public Map<String, Object> getRestServerParametersMap(final boolean isEmpty) {
+        final Map<String, Object> map = new TreeMap<>();
+        map.put("https", REST_SERVER_HTTPS);
+        map.put("aaf", REST_SERVER_AAF);
+
+        if (!isEmpty) {
+            map.put("host", REST_SERVER_HOST);
+            map.put("port", REST_SERVER_PORT);
+            map.put("userName", REST_SERVER_USER);
+            map.put("password", REST_SERVER_PASSWORD);
+        }
+
+        return map;
+    }
+
+    /**
+     * Returns a property map for a TopicParameters map for test cases.
+     *
+     * @param isEmpty boolean value to represent that object created should be empty or not
+     * @return a property map suitable for constructing an object
+     */
+    public Map<String, Object> getTopicParameterGroupMap(final boolean isEmpty) {
+        final Map<String, Object> map = new TreeMap<>();
+        if (!isEmpty) {
+            map.put("topicSources", TOPIC_PARAMS);
+            map.put("topicSinks", TOPIC_PARAMS);
+        }
+
+        return map;
+    }
+
+    /**
+     * Gets the standard parameter group as a String.
+     *
+     * @param filePath path of the file
+     * @return the standard parameters
+     * @throws IOException when file read operation fails
+     */
+    public String getParameterGroupAsString(String filePath) throws IOException {
+        File file = new File(filePath);
+        String json = new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8);
+        return json;
+    }
+}
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/RestServerParametersTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/RestServerParametersTest.java
new file mode 100644
index 0000000..ca2b3c4
--- /dev/null
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/RestServerParametersTest.java
@@ -0,0 +1,85 @@
+/*-
+ * ============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.common.endpoints.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.utils.coder.Coder;
+import org.onap.policy.common.utils.coder.StandardCoder;
+
+/**
+ * Class to perform unit test of {@link RestServerParameters}.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+public class RestServerParametersTest {
+
+    private static CommonTestData testData = new CommonTestData();
+    private static final Coder coder = new StandardCoder();
+
+    @Test
+    public void test() throws Exception {
+        final RestServerParameters restServerParameters =
+                testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
+        final GroupValidationResult validationResult = restServerParameters.validate();
+        assertTrue(validationResult.isValid());
+        assertEquals(CommonTestData.REST_SERVER_HOST, restServerParameters.getHost());
+        assertEquals(CommonTestData.REST_SERVER_PORT, restServerParameters.getPort());
+        assertEquals(CommonTestData.REST_SERVER_USER, restServerParameters.getUserName());
+        assertEquals(CommonTestData.REST_SERVER_PASSWORD, restServerParameters.getPassword());
+        assertEquals(CommonTestData.REST_SERVER_HTTPS, restServerParameters.isHttps());
+        assertEquals(CommonTestData.REST_SERVER_AAF, restServerParameters.isAaf());
+    }
+
+    @Test
+    public void testValidate() throws Exception {
+        final RestServerParameters restServerParameters =
+            testData.toObject(testData.getRestServerParametersMap(false), RestServerParameters.class);
+        final GroupValidationResult result = restServerParameters.validate();
+        assertNull(result.getResult());
+        assertTrue(result.isValid());
+    }
+
+    @Test
+    public void test_valid() throws Exception {
+        String json = testData.getParameterGroupAsString(
+            "src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json");
+        RestServerParameters restServerParameters = coder.decode(json, RestServerParameters.class);
+        final GroupValidationResult result = restServerParameters.validate();
+        assertNull(result.getResult());
+        assertTrue(result.isValid());
+    }
+
+    @Test
+    public void test_invalid() throws Exception {
+        String json = testData.getParameterGroupAsString(
+            "src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json");
+        RestServerParameters restServerParameters = coder.decode(json, RestServerParameters.class);
+        final GroupValidationResult result = restServerParameters.validate();
+        assertFalse(result.isValid());
+        assertTrue(result.getResult().contains("parameter group has status INVALID"));
+    }
+}
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/TopicParameterGroupTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/TopicParameterGroupTest.java
new file mode 100644
index 0000000..eaf0b2a
--- /dev/null
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/parameters/TopicParameterGroupTest.java
@@ -0,0 +1,80 @@
+/*-
+ * ============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.common.endpoints.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.utils.coder.Coder;
+import org.onap.policy.common.utils.coder.StandardCoder;
+
+/**
+ * Class to perform unit test of {@link TopicParameterGroup}.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+public class TopicParameterGroupTest {
+    private static CommonTestData testData = new CommonTestData();
+    private static final Coder coder = new StandardCoder();
+
+    @Test
+    public void test() throws Exception {
+        final TopicParameterGroup topicParameterGroup =
+                testData.toObject(testData.getTopicParameterGroupMap(false), TopicParameterGroup.class);
+        final GroupValidationResult validationResult = topicParameterGroup.validate();
+        assertTrue(validationResult.isValid());
+        assertEquals(CommonTestData.TOPIC_PARAMS, topicParameterGroup.getTopicSinks());
+        assertEquals(CommonTestData.TOPIC_PARAMS, topicParameterGroup.getTopicSources());
+    }
+
+    @Test
+    public void testValidate() throws Exception {
+        final TopicParameterGroup topicParameterGroup =
+            testData.toObject(testData.getTopicParameterGroupMap(false), TopicParameterGroup.class);
+        final GroupValidationResult result = topicParameterGroup.validate();
+        assertNull(result.getResult());
+        assertTrue(result.isValid());
+    }
+
+    @Test
+    public void test_valid() throws Exception {
+        String json = testData.getParameterGroupAsString(
+            "src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json");
+        TopicParameterGroup topicParameterGroup = coder.decode(json, TopicParameterGroup.class);
+        final GroupValidationResult result = topicParameterGroup.validate();
+        assertNull(result.getResult());
+        assertTrue(result.isValid());
+    }
+
+    @Test
+    public void test_invalid() throws Exception {
+        String json = testData.getParameterGroupAsString(
+            "src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json");
+        TopicParameterGroup topicParameterGroup = coder.decode(json, TopicParameterGroup.class);
+        final GroupValidationResult result = topicParameterGroup.validate();
+        assertFalse(result.isValid());
+        assertTrue(result.getResult().contains("parameter group has status INVALID"));
+    }
+}
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java
new file mode 100644
index 0000000..e1c0dbc
--- /dev/null
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/utils/ParameterUtilsTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============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.common.endpoints.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Properties;
+import org.junit.Test;
+import org.onap.policy.common.endpoints.parameters.CommonTestData;
+import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
+
+/**
+ * Class to perform unit test of {@link ParameterUtils}.
+ *
+ * @author Ajith Sreekumar (ajith.sreekumar@est.tech)
+ */
+public class ParameterUtilsTest {
+
+    /**
+     * Test getTopicProperties from TopicParameterGroup.
+     */
+    @Test
+    public void testGetTopicProperties() {
+        CommonTestData testData = new CommonTestData();
+        final TopicParameterGroup topicParameterGroup =
+            testData.toObject(testData.getTopicParameterGroupMap(false), TopicParameterGroup.class);
+        Properties topicProperties = ParameterUtils.getTopicProperties(topicParameterGroup);
+        assertEquals(CommonTestData.TOPIC_NAME,
+            topicProperties.getProperty(CommonTestData.TOPIC_INFRA + ".source.topics"));
+        assertEquals(CommonTestData.TOPIC_NAME,
+            topicProperties.getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics"));
+        assertEquals(CommonTestData.TOPIC_SERVER, topicProperties
+            .getProperty(CommonTestData.TOPIC_INFRA + ".source.topics." + CommonTestData.TOPIC_NAME + ".servers"));
+        assertEquals(CommonTestData.TOPIC_SERVER, topicProperties
+            .getProperty(CommonTestData.TOPIC_INFRA + ".sink.topics." + CommonTestData.TOPIC_NAME + ".servers"));
+    }
+}
diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json
new file mode 100644
index 0000000..b106d72
--- /dev/null
+++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_invalid.json
@@ -0,0 +1,7 @@
+{
+    "port": 6969,
+    "userName": "username",
+    "password": "password",
+    "https": true,
+    "aaf": false
+}
\ No newline at end of file
diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json
new file mode 100644
index 0000000..6c11305
--- /dev/null
+++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/RestServerParameters_valid.json
@@ -0,0 +1,8 @@
+{
+    "host": "0.0.0.0",
+    "port": 6969,
+    "userName": "username",
+    "password": "password",
+    "https": true,
+    "aaf": false
+}
\ No newline at end of file
diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json
new file mode 100644
index 0000000..775b488
--- /dev/null
+++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_invalid.json
@@ -0,0 +1,6 @@
+{
+    "topicSources" : [{
+        "topic" : "ueb-source",
+        "servers" : ["my-server"]
+    }]
+}
\ No newline at end of file
diff --git a/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json
new file mode 100644
index 0000000..9222afa
--- /dev/null
+++ b/policy-endpoints/src/test/resources/org/onap/policy/common/endpoints/parameters/TopicParameters_valid.json
@@ -0,0 +1,28 @@
+{
+    "topicSources" : [ {
+        "topic" : "ueb-source",
+        "servers" : [ "my-server" ],
+        "topicCommInfrastructure" : "ueb"
+    },{
+        "topic" : "POLICY-PDP-PAP1",
+        "servers" : [ "message-router1, message-router2" ],
+        "topicCommInfrastructure" : "dmaap"
+    },{
+        "topic" : "POLICY-PDP-PAP2",
+        "servers" : [ "message-router2, message-router3" ],
+        "topicCommInfrastructure" : "dmaap"
+    }],
+    "topicSinks" : [ {
+        "topic" : "ueb-sink",
+        "servers" : [ "my-server" ],
+        "topicCommInfrastructure" : "ueb"
+    },{
+        "topic" : "POLICY-PDP-PAP2",
+        "servers" : [ "message-router1, message-router2" ],
+        "topicCommInfrastructure" : "dmaap"
+    },{
+        "topic" : "POLICY-PDP-PAP3",
+        "servers" : [ "message-router2, message-router3" ],
+        "topicCommInfrastructure" : "dmaap"
+    }]
+}
\ No newline at end of file
