Skip to content

Commit

Permalink
Update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hwupathum committed Oct 2, 2024
1 parent 0be778c commit d3ac9cc
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
import org.wso2.carbon.registry.core.Collection;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.registry.core.session.UserRegistry;
import org.wso2.carbon.security.keystore.KeyStoreAdmin;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;

import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.SecureRandom;
import java.util.HashMap;
import javax.net.ssl.KeyManager;
Expand All @@ -70,7 +70,7 @@
*/
@PrepareForTest({HttpServletRequest.class, IdentityProviderManager.class, InitializationService.class,
SSLContext.class, IdentityProvider.class, IdentityUtil.class, ServerConfiguration.class,
KeyStoreManager.class, Class.class, KeyStoreAdmin.class, KeyStoreUtil.class, IdentityTenantUtil.class })
KeyStoreManager.class, Class.class, KeyStoreUtil.class, IdentityTenantUtil.class })
@PowerMockIgnore({"javax.xml.*", "org.xml.*", "org.apache.xerces.*", "org.w3c.dom.*", "javax.net.*", "javax.security.*"})
public class SAMLLogoutHandlerTest extends PowerMockTestCase {

Expand Down Expand Up @@ -188,6 +188,7 @@ private void createMocks() throws Exception {
mockStatic(KeyStoreManager.class);
when(KeyStoreManager.getInstance(MultitenantConstants.SUPER_TENANT_ID)).thenReturn(keyStoreManager);
when(keyStoreManager.getPrimaryKeyStore()).thenReturn(keyStore);
when(keyStoreManager.getDefaultPrivateKey()).thenReturn((PrivateKey) keyStore.getKey("wso2carbon", "wso2carbon".toCharArray()));
}

@Test
Expand Down

0 comments on commit d3ac9cc

Please sign in to comment.