diff options
Diffstat (limited to 'utils-test/src/main')
5 files changed, 16 insertions, 15 deletions
diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/gson/GsonTestUtils.java b/utils-test/src/main/java/org/onap/policy/common/utils/gson/GsonTestUtils.java index 8276ea4c..1d131aed 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/gson/GsonTestUtils.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/gson/GsonTestUtils.java @@ -21,7 +21,7 @@ package org.onap.policy.common.utils.gson; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import com.google.gson.Gson; import com.google.gson.JsonArray; @@ -49,6 +49,7 @@ import org.slf4j.LoggerFactory; /** * Utilities used to test encoding and decoding of Policy objects. */ +@Getter @AllArgsConstructor(access = AccessLevel.PROTECTED) public class GsonTestUtils { @@ -67,7 +68,6 @@ public class GsonTestUtils { /** * Used to encode and decode an object via gson. */ - @Getter private Gson gson; /** diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java b/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java index 0787872c..9fa1067d 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/security/SelfSignedKeyStore.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,7 +37,6 @@ import java.security.cert.CertificateException; import java.util.Arrays; import java.util.Date; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import lombok.Getter; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x509.Extension; @@ -75,9 +75,8 @@ public class SelfSignedKeyStore { * Generates the keystore, if it does not exist or if it's more than a few hours old. * * @throws IOException if an I/O error occurs - * @throws InterruptedException if an interrupt occurs */ - public SelfSignedKeyStore() throws IOException, InterruptedException { + public SelfSignedKeyStore() throws IOException { this(RELATIVE_PATH); } @@ -87,9 +86,8 @@ public class SelfSignedKeyStore { * @param relativePath path to the keystore, relative to the "user.dir" system * property * @throws IOException if an I/O error occurs - * @throws InterruptedException if an interrupt occurs */ - public SelfSignedKeyStore(String relativePath) throws IOException, InterruptedException { + public SelfSignedKeyStore(String relativePath) throws IOException { keystoreName = System.getProperty("user.dir") + "/" + relativePath; // use existing file if it isn't too old diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java b/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java index 1ab1f285..34dc5681 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java @@ -3,6 +3,7 @@ * Common Utils-Test * ============================================================================= * Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +21,9 @@ package org.onap.policy.common.utils.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.lang.reflect.Constructor; diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/test/ThrowablesTester.java b/utils-test/src/main/java/org/onap/policy/common/utils/test/ThrowablesTester.java index 06ca8046..62584c76 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/test/ThrowablesTester.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/test/ThrowablesTester.java @@ -3,6 +3,7 @@ * Common Utils-Test * ============================================================================= * Copyright (C) 2018, 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,10 +21,10 @@ package org.onap.policy.common.utils.test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java b/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java index 9e61eaa3..8ffcd36a 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/time/TestTimeMulti.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2018-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +21,7 @@ package org.onap.policy.common.utils.time; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.fail; import java.util.Iterator; import java.util.LinkedList; |