diff --git a/starter-kit/src/test/java/it/spid/cie/oidc/handler/TestRelyingPartyHandler2.java b/starter-kit/src/test/java/it/spid/cie/oidc/handler/TestRelyingPartyHandler2.java index e7ef009..71ebd4c 100644 --- a/starter-kit/src/test/java/it/spid/cie/oidc/handler/TestRelyingPartyHandler2.java +++ b/starter-kit/src/test/java/it/spid/cie/oidc/handler/TestRelyingPartyHandler2.java @@ -7,6 +7,7 @@ import java.lang.reflect.Method; +import it.spid.cie.oidc.exception.OIDCException; import org.json.JSONObject; import org.junit.Test; @@ -148,6 +149,17 @@ public void test_getUserInfo() { MemoryStorage storage = null; boolean catched = false; + try { + options = RPTestUtils.getOptions(); + storage = new MemoryStorage(); + handler = new RelyingPartyHandler(options, storage); + handler.getUserInfo("test","test"); + } catch (OIDCException e) { + catched = true; + } catch (Exception e) { + catched = true; + } + assertTrue(catched); try { options = RPTestUtils.getOptions(); @@ -159,7 +171,7 @@ public void test_getUserInfo() { catched = true; } - assertFalse(catched); + assertTrue(catched); // Case