diff options
Diffstat (limited to 'integrity-monitor/src/test')
3 files changed, 7 insertions, 9 deletions
diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java index 3c071f18..f866df47 100644 --- a/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java +++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/IntegrityMonitorTest.java @@ -559,7 +559,7 @@ class IntegrityMonitorTest extends IntegrityMonitorTestBase { @SuppressWarnings("rawtypes") List resourceList = query.getResultList(); if (resourceList.isEmpty()) { - logger.debug("Record not found, resourceName: " + resourceName); + logger.debug("Record not found, resourceName: {}", resourceName); fail("missing record"); } @@ -626,7 +626,7 @@ class IntegrityMonitorTest extends IntegrityMonitorTestBase { assertEquals(StateManagement.HOT_STANDBY, sme1.getStandbyStatus()); logger.debug("--"); } else { - logger.debug("Record not found, resourceName: " + resourceName); + logger.debug("Record not found, resourceName: {}", resourceName); fail("record not found"); } diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java index 2670b704..266b3221 100644 --- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java +++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementEntityTest.java @@ -73,7 +73,7 @@ class StateManagementEntityTest extends IntegrityMonitorTestBase { } @Test - void testJpa() throws Exception { + void testJpa() { logger.debug("\n??? logger.infor StateManagementEntityTest: Entering\n\n"); // Define the resourceName for the StateManagement constructor diff --git a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java index f43322de..5dfd01f3 100644 --- a/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java +++ b/integrity-monitor/src/test/java/org/onap/policy/common/im/StateManagementTest.java @@ -99,7 +99,7 @@ class StateManagementTest extends IntegrityMonitorTestBase { logger.info("\n\nStateManagementTest: Exit\n\n"); } - private void test_1(final StateManagement sm) throws StateManagementException, IntegrityMonitorException { + private void test_1(final StateManagement sm) throws IntegrityMonitorException { logger.info("\n??? initial state"); assertEquals(UNLOCKED_ENABLED_NULL_NULL, makeString(sm)); @@ -167,7 +167,7 @@ class StateManagementTest extends IntegrityMonitorTestBase { assertEquals(UNLOCKED_ENABLED_NULL_HOTSTANDBY, makeString(sm2)); } - private void test_2(final StateManagement sm) throws StateManagementException, IntegrityMonitorException { + private void test_2(final StateManagement sm) throws IntegrityMonitorException { // D3 If demote() is called while standbyStatus is null and // adminState is locked or opState is disabled, // the state shall transition to coldstandby @@ -231,8 +231,7 @@ class StateManagementTest extends IntegrityMonitorTestBase { @Test @SuppressWarnings("unchecked") - void test_StateManagementInitialization_ThrowException_ifEntityManagerCreateQuerythrowsAnyException() - throws Exception { + void test_StateManagementInitialization_ThrowException_ifEntityManagerCreateQuerythrowsAnyException() { assertThatThrownBy(() -> { final EntityManager mockedEm = getMockedEntityManager(); final EntityManagerFactory mockedEmf = getMockedEntityManagerFactory(mockedEm); @@ -246,8 +245,7 @@ class StateManagementTest extends IntegrityMonitorTestBase { @Test @SuppressWarnings("unchecked") - void test_StateManagementInitialization_ThrowStateManagementException_ifEntityManagerThrowsAnyException() - throws Exception { + void test_StateManagementInitialization_ThrowStateManagementException_ifEntityManagerThrowsAnyException() { assertThatThrownBy(() -> { final EntityManager mockedEm = getMockedEntityManager(); final EntityManagerFactory mockedEmf = getMockedEntityManagerFactory(mockedEm); |