From 3aa6aa7183260a82c88eff23e1844541eb9dab39 Mon Sep 17 00:00:00 2001 From: Madhavi Gayathri Date: Thu, 5 Dec 2024 10:01:45 +0530 Subject: [PATCH] Fix test. --- .../test/oidc/OIDCAccessTokenAttributesTestCase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oidc/OIDCAccessTokenAttributesTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oidc/OIDCAccessTokenAttributesTestCase.java index 3f5787ac399..c760ba0953f 100755 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oidc/OIDCAccessTokenAttributesTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oidc/OIDCAccessTokenAttributesTestCase.java @@ -137,13 +137,15 @@ public void testUpdateAccessTokenAttributes() throws Exception { accessTokenConfig.setUserAccessTokenExpiryInSeconds(3600L); accessTokenConfig.setApplicationAccessTokenExpiryInSeconds(3600L); // Add access token attributes - accessTokenConfig.setAccessTokenAttributes(new ArrayList<>()); + List accessTokenAttributes = new ArrayList<>(); + accessTokenAttributes.add("username"); + accessTokenConfig.setAccessTokenAttributes(accessTokenAttributes); oidcInboundConfig.setAccessToken(accessTokenConfig); updateApplicationInboundConfig(application.getApplicationId(), oidcInboundConfig, OIDC); OpenIDConnectConfiguration updatedOidcInboundConfig = getOIDCInboundDetailsOfApplication(application.getApplicationId()); - Assert.assertFalse(updatedOidcInboundConfig.getAccessToken().getAccessTokenAttributes().isEmpty(), + Assert.assertEquals(updatedOidcInboundConfig.getAccessToken().getAccessTokenAttributes().size(),1, "Access token attribute should not be empty."); }