Remove powermock to increase coverage 53/94153/8
authorJim Hahn <jrh3@att.com>
Thu, 22 Aug 2019 18:21:14 +0000 (14:21 -0400)
committerJim Hahn <jrh3@att.com>
Thu, 22 Aug 2019 21:07:37 +0000 (17:07 -0400)
commit962dd9714c6d35cacdec0ee8e601431aa349001a
tree03ce05c9c64680f0c44fa22734294292a1a12064
parente78f07ad32ffb52ed5d3e02295ed5282841870f3
Remove powermock to increase coverage

Removed powermock from the junit tests of these classes to increase
reported sonar coverage:
  RESTfulPAPEngine
  BrmsGateway

Typically added override methods to the classes under test, to replace
the overrides originally provided by powermock.

Also needed to add code to RESTfulPAPEngineTest to clear the XACML
properties before the test ran.  Modified to use the existing
XACMLProperties.reloadProperties() method.

Also modified PolicyNotificationMailTest to use a host/port that
has no listener so that the test runs faster.

Fixed some newly introduced sonar issues.

Change-Id: I65e36b01e9506987032eb21baac808ed3dfd4f47
Issue-ID: POLICY-1937
Signed-off-by: Jim Hahn <jrh3@att.com>
BRMSGateway/src/main/java/org/onap/policy/brms/api/BrmsGateway.java
BRMSGateway/src/test/java/org/onap/policy/brms/api/BrmsGatewayTest.java
POLICY-SDK-APP/src/main/java/org/onap/policy/admin/RESTfulPAPEngine.java
POLICY-SDK-APP/src/test/java/org/onap/policy/admin/PolicyNotificationMailTest.java
POLICY-SDK-APP/src/test/java/org/onap/policy/admin/RESTfulPAPEngineTest.java