X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Faai%2Fbabel%2FTestMicroServiceAuthCore.java;h=65c7c03bdcfd831ba28258478bf9793eefb26c9e;hb=176c445bbeb5e47011ff2ca4816c00dd0f6ea779;hp=8fe4508a38babe0af2e7bbdfcae932f133d63b5c;hpb=811169825805a7160a6dd28abb281f64a4a56c71;p=aai%2Fbabel.git 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"); + }); } }