From f10d38d4af0178d008c69ada7cd1a6abc6ec075a Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 13 Feb 2019 16:16:45 -0500 Subject: Sonar fixes Added test for Serializer to increase junit coverage. Added tests for TestTimeMulti to increase junit coverage. Sonar fixes for PropertyConfiguration: - use equalsIgnoreCase - use the exception Updated license dates. Some fixes for LoggerFactoryWrapper to address sonar issue - utility classes should typically have a private constructor. Change-Id: I8957e9673fe8371ecca7abbb7ece87b0d6f46c1a Issue-ID: POLICY-1519 Signed-off-by: Jim Hahn --- .../org/onap/policy/common/utils/slf4j/LoggerFactoryWrapperTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils/src/test/java') diff --git a/utils/src/test/java/org/onap/policy/common/utils/slf4j/LoggerFactoryWrapperTest.java b/utils/src/test/java/org/onap/policy/common/utils/slf4j/LoggerFactoryWrapperTest.java index dbe2e671..4bf8db30 100644 --- a/utils/src/test/java/org/onap/policy/common/utils/slf4j/LoggerFactoryWrapperTest.java +++ b/utils/src/test/java/org/onap/policy/common/utils/slf4j/LoggerFactoryWrapperTest.java @@ -3,6 +3,7 @@ * ONAP Policy Engine - Common Modules * ================================================================================ * Copyright (C) 2019 Samsung Electronics. All rights reserved. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +25,6 @@ package org.onap.policy.common.utils.slf4j; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -47,6 +47,6 @@ public class LoggerFactoryWrapperTest { PowerMockito.mockStatic(LoggerFactory.class); PowerMockito.when(LoggerFactory.getLogger(netLoggerName)).thenReturn(mockLogger); - assertSame(LoggerFactoryWrapper.getNetworkLogger(), mockLogger); + assertSame(mockLogger, LoggerFactoryWrapper.getNetworkLogger()); } } -- cgit 1.2.3-korg