From c8c30d7471151e672a44b6c47892bbac1caa932a Mon Sep 17 00:00:00 2001 From: YuriyZ Date: Tue, 1 Nov 2022 17:26:10 +0200 Subject: [PATCH] test(jans-auth-server): fix TokenExchangeServiceTest (native sso) #2829 (#2830) --- .../test/java/io/jans/as/server/util/TestUtil.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jans-auth-server/server/src/test/java/io/jans/as/server/util/TestUtil.java b/jans-auth-server/server/src/test/java/io/jans/as/server/util/TestUtil.java index 50376b09352..42216511bf9 100644 --- a/jans-auth-server/server/src/test/java/io/jans/as/server/util/TestUtil.java +++ b/jans-auth-server/server/src/test/java/io/jans/as/server/util/TestUtil.java @@ -3,10 +3,10 @@ import io.jans.as.client.RegisterResponse; import io.jans.as.model.error.ErrorResponse; import jakarta.ws.rs.core.Response; +import org.apache.commons.lang3.StringUtils; import static io.jans.as.model.uma.TestUtil.assertNotBlank; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.*; /** * @author yuriyz @@ -16,6 +16,14 @@ public class TestUtil { private TestUtil() { } + public static void assertEmpty(String s) { + assertTrue(StringUtils.isBlank(s)); + } + + public static void assertNotEmpty(String s) { + assertTrue(StringUtils.isNotBlank(s)); + } + public static void assert_(RegisterResponse response) { assertNotNull(response); assertNotBlank(response.getClientId());