diff options
Diffstat (limited to 'src/test/java/org/onap/aai/babel/TestMicroServiceAuthCore.java')
-rw-r--r-- | src/test/java/org/onap/aai/babel/TestMicroServiceAuthCore.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/test/java/org/onap/aai/babel/TestMicroServiceAuthCore.java b/src/test/java/org/onap/aai/babel/TestMicroServiceAuthCore.java index 8fe4508..65c7c03 100644 --- a/src/test/java/org/onap/aai/babel/TestMicroServiceAuthCore.java +++ b/src/test/java/org/onap/aai/babel/TestMicroServiceAuthCore.java @@ -21,7 +21,9 @@ package org.onap.aai.babel; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; import org.onap.aai.auth.AAIAuthException; import org.onap.aai.auth.AAIMicroServiceAuthCore; @@ -37,9 +39,11 @@ public class TestMicroServiceAuthCore { * @throws AAIAuthException * when the module has not been initialized */ - @Test(expected = AAIAuthException.class) + @Test public void testUninitializedModule() throws AAIAuthException { - AAIMicroServiceAuthCore.authorize("user", "method:func"); + assertThrows(AAIAuthException.class, () -> { + AAIMicroServiceAuthCore.authorize("user", "method:func"); + }); } } |