aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/test/java/org/onap/policy/common/utils/io/SerializerTest.java
AgeCommit message (Collapse)AuthorFilesLines
2023-01-31Upgrade and clean up dependenciesliamfallon1-4/+5
- Upgrade Hibernate - Upgrade Mockito - Upgrade Mockserver - Remove Powermock (no longer supported) and replace with spring-test ReflectionTestUtils - Upgrade Spring Framework - Add spring-security to allow authentication on unit tests using MockMVC Minor clean-up - Replace deprecated authorization configuraiton on spring boot applications with SecurityFilterChain bean - Change @LocalPort include on tests to use test include rather than runtime include - Remove unused imports - Remove unused constants and variables - Add deprecation annotations where required Issue-ID: POLICY-4482 Change-Id: Iec5ba1283acd506c9f3c7fe7b5d7858db6abbaa7 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-18More sonar issues in policy-commonJim Hahn1-16/+21
Addressed the following sonar issues: - add parameters to types - ObjectInputStream.readObject() is unsafe Issue-ID: POLICY-2650 Change-Id: I41e1bd08643b04f409ce87c884cb0c28995e431b Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-12Apply simple sonar fixesJim Hahn1-7/+8
Note: A number of these were identified, by SonarLint, in the Test classes, which are not typically scanned by Sonar. Removed unnecessary imports. Removed unneeded "throws Xxx". Replaced lambda with method references. Replaced duplicate strings with constants. Replaced try-fail-catch with assert-j methods to eliminate sonar complaints about duplicate failure messages. Added missing @Override annotations. Use map.computeIfAbsent() where appropriate. Also fixed some minor checkstyle issues. Removed unneeded "volatile" declarations. Replaced some if-else constructs with "?:" construct, per sonar. Replaced Object.wait() with CountDownLatch.await(); according to sonar (and javadocs), Object.wait() can return due to "spurious wakeups". Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse. Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-02-14Sonar fixesJim Hahn1-2/+26
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 <jrh3@att.com>
2019-01-08Replace expectException with AssertJJim Hahn1-31/+10
Change-Id: I73c186f181960ac7ac8cd985e55db1831963910f Issue-ID: POLICY-1392 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-21new sonar issues in policy/commonJim Hahn1-24/+49
Only throw one type of exception in Serializer. Try to increase test coverage in Serializer. Change-Id: I170de0ab727041aa42731c08d6cc454731d29a20 Issue-ID: POLICY-1130 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-14add more junit coverage to new Serializer classJim Hahn1-2/+278
Removed calls to superclass methods so that appropriate exceptions are thrown. Better comments for new tests. Removed @Ignore from tests. Removed tabs from pom. Change-Id: I97fa63951eed4c2ac5ce0a267d8da5134a2a1c71 Issue-ID: POLICY-1106 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-09-13add utility class to test serializable classesJim Hahn1-0/+95
Closed the ByteArrayXxxStreams. Closed byte output stream, even if exception in object stream. Change-Id: I3f779a5c0e6df3ac3496abe60a46e0696b4e261c Issue-ID: POLICY-1106 Signed-off-by: Jim Hahn <jrh3@att.com>