summaryrefslogtreecommitdiffstats
path: root/common/src/test/java/org
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2022-03-15 09:38:05 +0000
committerAdheli Tavares <adheli.tavares@est.tech>2022-03-22 09:32:06 +0000
commite5a316e5c8aeaae1ba4aead0a71b6baf2f8cc5c1 (patch)
treed81fc10a5ca261ca2e99753697b1345019b2c6ba /common/src/test/java/org
parentcbd4d5dbe88928d5765e9749987f6b93f2b347e9 (diff)
Clean up of test resources not used by ACM
Issue-ID: POLICY-3945 Change-Id: I9d3b47a47288816f7ff3d60b21237a458b14cf68 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'common/src/test/java/org')
-rw-r--r--common/src/test/java/org/onap/policy/clamp/common/acm/exception/ExceptionsTest.java6
-rw-r--r--common/src/test/java/org/onap/policy/clamp/common/acm/rest/CoderHttpMessageConverterTest.java15
-rw-r--r--common/src/test/java/org/onap/policy/clamp/common/acm/rest/RequestResponseLoggingFilterTest.java4
3 files changed, 11 insertions, 14 deletions
diff --git a/common/src/test/java/org/onap/policy/clamp/common/acm/exception/ExceptionsTest.java b/common/src/test/java/org/onap/policy/clamp/common/acm/exception/ExceptionsTest.java
index ef0472cdc..5c9db9073 100644
--- a/common/src/test/java/org/onap/policy/clamp/common/acm/exception/ExceptionsTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/common/acm/exception/ExceptionsTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2022 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@
package org.onap.policy.clamp.common.acm.exception;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.IOException;
import javax.ws.rs.core.Response;
diff --git a/common/src/test/java/org/onap/policy/clamp/common/acm/rest/CoderHttpMessageConverterTest.java b/common/src/test/java/org/onap/policy/clamp/common/acm/rest/CoderHttpMessageConverterTest.java
index 5c5bf3fbb..f172358c0 100644
--- a/common/src/test/java/org/onap/policy/clamp/common/acm/rest/CoderHttpMessageConverterTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/common/acm/rest/CoderHttpMessageConverterTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2022 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,8 +20,8 @@
package org.onap.policy.clamp.common.acm.rest;
-import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -37,7 +37,7 @@ class CoderHttpMessageConverterTest {
@Test
- void coderHttpMesageConverterTest() throws AutomationCompositionRuntimeException, IOException {
+ void coderHttpMessageConverterTest() throws AutomationCompositionRuntimeException, IOException {
var y = new CoderHttpMesageConverter<>("yaml");
var j = new CoderHttpMesageConverter<>("json");
@@ -46,15 +46,12 @@ class CoderHttpMessageConverterTest {
var testInputStream = new ByteArrayInputStream("testdata".getBytes());
HttpInputMessage input = Mockito.mock(HttpInputMessage.class);
Mockito.when(input.getBody()).thenReturn(testInputStream);
- assertThrows(AutomationCompositionRuntimeException.class, () -> {
- y.readInternal(RequestResponseLoggingFilterTest.class, input);
- });
+ assertThrows(AutomationCompositionRuntimeException.class,
+ () -> y.readInternal(RequestResponseLoggingFilterTest.class, input));
var testOutputStream = new ByteArrayOutputStream();
HttpOutputMessage output = Mockito.mock(HttpOutputMessage.class);
Mockito.when(output.getBody()).thenReturn(testOutputStream);
- assertThrows(AutomationCompositionRuntimeException.class, () -> {
- j.writeInternal(String.class, output);
- });
+ assertThrows(AutomationCompositionRuntimeException.class, () -> j.writeInternal(String.class, output));
}
}
diff --git a/common/src/test/java/org/onap/policy/clamp/common/acm/rest/RequestResponseLoggingFilterTest.java b/common/src/test/java/org/onap/policy/clamp/common/acm/rest/RequestResponseLoggingFilterTest.java
index ff6e1cd34..0fc77b139 100644
--- a/common/src/test/java/org/onap/policy/clamp/common/acm/rest/RequestResponseLoggingFilterTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/common/acm/rest/RequestResponseLoggingFilterTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021-2022 Nordix Foundation.
* ================================================================================
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
@@ -35,7 +35,7 @@ import org.mockito.Mockito;
class RequestResponseLoggingFilterTest {
@Test
- void initTest() throws IOException, ServletException {
+ void initTest() {
var e = new RequestResponseLoggingFilter();
var res = Mockito.mock(HttpServletResponse.class);
var req = Mockito.mock(HttpServletRequest.class);