diff --git a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml
index 8b646fa964..f35ea73b60 100644
--- a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml
+++ b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/pom.xml
@@ -155,7 +155,12 @@
org.powermock
- powermock-api-mockito
+ powermock-api-mockito2
+ test
+
+
+ org.mockito
+ mockito-core
test
@@ -253,12 +258,19 @@
org.apache.maven.plugins
maven-surefire-plugin
+
+ --add-opens=java.xml/jdk.xml.internal=ALL-UNNAMED
+ --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
+
file:src/test/resources/log4j.properties
src/test/resources/testng.xml
+
+ org.ops4j.pax.logging
+
diff --git a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/java/io/entgra/device/mgt/core/identity/jwt/client/extension/service/JWTClientTest.java b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/java/io/entgra/device/mgt/core/identity/jwt/client/extension/service/JWTClientTest.java
index d497d5e108..beb7db9962 100644
--- a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/java/io/entgra/device/mgt/core/identity/jwt/client/extension/service/JWTClientTest.java
+++ b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/java/io/entgra/device/mgt/core/identity/jwt/client/extension/service/JWTClientTest.java
@@ -43,9 +43,10 @@ import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import org.powermock.modules.testng.PowerMockTestCase;
@PrepareForTest(JWTClientUtil.class)
-public class JWTClientTest {
+public class JWTClientTest extends PowerMockTestCase{
private static final Log log = LogFactory.getLog(JWTClientTest.class);
@ObjectFactory
diff --git a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/resources/user-test/user-mgt-registry-test.xml b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/resources/user-test/user-mgt-registry-test.xml
index fc32a2698d..96fd6acfff 100644
--- a/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/resources/user-test/user-mgt-registry-test.xml
+++ b/components/identity-extensions/io.entgra.device.mgt.core.identity.jwt.client.extension/src/test/resources/user-test/user-mgt-registry-test.xml
@@ -27,7 +27,7 @@
everyone
false
500
- jdbc:h2:target/databasetest/CARBON_TEST
+ jdbc:h2:./target/databasetest/CARBON_TEST
org.h2.Driver
50
60000