summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java4
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyModelsTest.java12
-rw-r--r--policy-utils/src/main/java/org/onap/policy/drools/policies/DomainMaker.java4
3 files changed, 10 insertions, 10 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java
index 69d57bc6..ffad9cfa 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/domain/models/controller/ControllerSourceTopic.java
@@ -20,7 +20,6 @@
package org.onap.policy.drools.domain.models.controller;
-import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
@@ -36,9 +35,6 @@ import lombok.experimental.SuperBuilder;
public class ControllerSourceTopic implements Serializable {
private static final long serialVersionUID = -1732598566914643612L;
- @SerializedName("topicName")
protected String topicName;
-
- @SerializedName("serialization")
protected List<ControllerSerialization> serialization;
}
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyModelsTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyModelsTest.java
index 813acdfa..d99dd089 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyModelsTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/domain/models/DroolsPolicyModelsTest.java
@@ -20,6 +20,8 @@
package org.onap.policy.drools.domain.models;
+import static org.junit.Assert.assertNotNull;
+
import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.filters.FilterChain;
import com.openpojo.reflection.filters.FilterClassName;
@@ -58,7 +60,8 @@ public class DroolsPolicyModelsTest {
@Test
public void testBuildDomainPolicyNativeDrools() {
/* manually create a native drools policy */
- NativeDroolsPolicy.builder().metadata(Metadata.builder().policyId("policy-id").build()).name("example")
+ assertNotNull(NativeDroolsPolicy.builder().metadata(Metadata.builder().policyId("policy-id").build())
+ .name("example")
.type("onap.policies.native.Drools")
.typeVersion("1.0.0")
.version("1.0.0")
@@ -68,19 +71,20 @@ public class DroolsPolicyModelsTest {
.rulesArtifact(
NativeDroolsRulesArtifact.builder().groupId("org.onap.policy.controlloop")
.artifactId("example").version("example").build()).build())
- .build();
+ .build());
}
@Test
public void testBuildDomainPolicyController() {
/* manually create a controller policy */
- ControllerPolicy.builder().metadata(Metadata.builder().policyId("policy-id").build()).name("example")
+ assertNotNull(ControllerPolicy.builder().metadata(Metadata.builder().policyId("policy-id").build())
+ .name("example")
.version("1.0.0")
.type("onap.policies.drools.Controller")
.typeVersion("1.0.0")
.properties(ControllerProperties.builder().controllerName("example").sourceTopics(
new ArrayList<>()).sinkTopics(new ArrayList<>()).build())
- .build();
+ .build());
}
} \ No newline at end of file
diff --git a/policy-utils/src/main/java/org/onap/policy/drools/policies/DomainMaker.java b/policy-utils/src/main/java/org/onap/policy/drools/policies/DomainMaker.java
index 6e1e0881..0097dff6 100644
--- a/policy-utils/src/main/java/org/onap/policy/drools/policies/DomainMaker.java
+++ b/policy-utils/src/main/java/org/onap/policy/drools/policies/DomainMaker.java
@@ -159,8 +159,8 @@ public class DomainMaker {
*/
public boolean registerValidator(@NonNull ToscaPolicyTypeIdentifier policyType) {
//
- // A known schema is an schema embedded in a .jar in the classpath under the schemas/
- // resource directory matching the following syntax: schemas/<policy-type>.schema.json.
+ // A known schema is one that embedded in a .jar in the classpath as a resource
+ // matching the following syntax: <policy-type-name>-<policy-type-version>.schema.json.
//
String schema =
ResourceUtils