use of org.wso2.carbon.identity.core.model.IdentityCookieConfig in project carbon-identity-framework by wso2.
the class IdentityUtilTest method testGetIdentityCookieConfig.
@Test
public void testGetIdentityCookieConfig() throws Exception {
Map<String, IdentityCookieConfig> mockIdentityCookiesConfigurationHolder = new HashMap<>();
IdentityCookieConfig cookieConfig = new IdentityCookieConfig("cookieName");
mockIdentityCookiesConfigurationHolder.put("cookie", cookieConfig);
Whitebox.setInternalState(IdentityUtil.class, "identityCookiesConfigurationHolder", mockIdentityCookiesConfigurationHolder);
assertEquals(IdentityUtil.getIdentityCookieConfig("cookie"), cookieConfig, "Invalid cookie config value " + "for: cookie");
assertNull(IdentityUtil.getIdentityCookieConfig("nonExisting"), "Non existing cookie key should be returned " + "with null");
}
Aggregations