Fix more sonar issues in drools-pdp

Addressed issues of cyclomatic complexity and deep nesting by
refactoring code into separate methods.  In some cases, had to
refactor the code into nested classes to avoid passing too many
parameters to the newly extracted methods.
Addressed issue "too many conditionals" by breaking conditionals
apart.
Addressed issue "Remove usage of generic wildcard type" by eliminating
"? extends" from return values.
Addressed issue "Remove this use of 'Thread.sleep()'" in junit tests
by introducing latches or using Awaitility.

Note: this won't build until ApiUtils has been merged.

Change-Id: I0d5596b4cb918a36bc22f426f426bd238195b458
Issue-ID: POLICY-1968
Signed-off-by: Jim Hahn <jrh3@att.com>
diff --git a/policy-management/pom.xml b/policy-management/pom.xml
index 857e62c..60175f6 100644
--- a/policy-management/pom.xml
+++ b/policy-management/pom.xml
@@ -330,5 +330,12 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.awaitility</groupId>
+            <artifactId>awaitility</artifactId>
+            <version>3.0.0</version>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 </project>