aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2019-10-03 17:45:05 +0100
committerMichaelMorris <michael.morris@est.tech>2019-10-09 09:20:49 +0100
commitfbf6300274558ffe323bf66bb5b23c72c350d3ee (patch)
tree052c66dd84c7f12580fc176535f00cd2814ece15 /common/src/test
parent6392515d91c00df8cb925ec9e99273a2f9e4744f (diff)
Improved error handling
Change-Id: Iac436f6a950bf61ac6321ef1d427a7bb14774e30 Issue-ID: SO-2395 Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'common/src/test')
-rw-r--r--common/src/test/java/org/onap/so/rest/service/HttpRestServiceProviderImplTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/src/test/java/org/onap/so/rest/service/HttpRestServiceProviderImplTest.java b/common/src/test/java/org/onap/so/rest/service/HttpRestServiceProviderImplTest.java
index 978c016dec..72bacdf2db 100644
--- a/common/src/test/java/org/onap/so/rest/service/HttpRestServiceProviderImplTest.java
+++ b/common/src/test/java/org/onap/so/rest/service/HttpRestServiceProviderImplTest.java
@@ -33,6 +33,7 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.onap.so.rest.exceptions.InvalidRestRequestException;
+import org.onap.so.rest.exceptions.HttpResouceNotFoundException;
import org.onap.so.rest.exceptions.RestProcessingException;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
@@ -116,7 +117,7 @@ public class HttpRestServiceProviderImplTest {
}
- @Test(expected = InvalidRestRequestException.class)
+ @Test(expected = HttpResouceNotFoundException.class)
public void test_get_ThrowsInvalidRestRequestExceptionifHttpClientErrorExceptionWithHttpStatusNotFoundHttpStatus() {
assertGetErrorScenario(HttpStatus.NOT_FOUND);
}
@@ -239,7 +240,7 @@ public class HttpRestServiceProviderImplTest {
}
- @Test(expected = InvalidRestRequestException.class)
+ @Test(expected = HttpResouceNotFoundException.class)
public void test_post_ThrowsInvalidRestRequestExceptionifHttpClientErrorExceptionWithHttpStatusNotFoundHttpStatus() {
assertPostErrorScenario(HttpStatus.NOT_FOUND);
}