Increase junit coverage in ONAP-logging 97/32297/3
authorJim Hahn <jrh3@att.com>
Tue, 20 Feb 2018 18:41:59 +0000 (13:41 -0500)
committerJim Hahn <jrh3@att.com>
Tue, 20 Feb 2018 19:16:41 +0000 (14:16 -0500)
commit7f6b1b0add6878e996e559c15337f46339c98901
treeed381d4fdaaed33a590c06145a9834331e32aa35
parent19d3bfa5a1e6f69cde7a5e814b1975330249dcd0
Increase junit coverage in ONAP-logging

Added some junit tests to increase coverage of ONAP-logger.
Many classes still need test cases.

Also fixed some sonar issues:
Returned interface instead of ConcurrentHashMap.
Used EnumMap instead of HashMap.
Used StringBuilder instead of StringBuffer.
Replaced literals with constants.
Replaced enum1.toString().equals(enum2.toString()) with enum1 == enum2

Updated license dates.
Updated another license date.

Change-Id: I777b6a913d7d03187a29dfeb817800b386ee23aa
Issue-ID: POLICY-582
Signed-off-by: Jim Hahn <jrh3@att.com>
13 files changed:
common-logging/src/main/java/org/onap/policy/common/logging/eelf/DroolsPDPMDCInfo.java
common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java
common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventTrackInfo.java
common-logging/src/main/java/org/onap/policy/common/logging/eelf/EventTrackInfoHandler.java
common-logging/src/main/java/org/onap/policy/common/logging/eelf/MDCInfo.java
common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/EelfLogger.java
common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger4J.java
common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/SystemOutLogger.java
common-logging/src/test/java/org/onap/policy/common/logging/eelf/DroolsPDPMDCInfoTest.java [new file with mode: 0644]
common-logging/src/test/java/org/onap/policy/common/logging/eelf/EventDataTest.java [new file with mode: 0644]
common-logging/src/test/java/org/onap/policy/common/logging/eelf/EventTrackInfoHandlerTest.java [new file with mode: 0644]
common-logging/src/test/java/org/onap/policy/common/logging/eelf/EventTrackInfoTest.java [new file with mode: 0644]