diff --git a/components/identity-core/org.wso2.carbon.identity.core/src/test/java/org/wso2/carbon/identity/core/IdentityKeyStoreResolverTest.java b/components/identity-core/org.wso2.carbon.identity.core/src/test/java/org/wso2/carbon/identity/core/IdentityKeyStoreResolverTest.java index 23b26e3b116..52abb6a1859 100644 --- a/components/identity-core/org.wso2.carbon.identity.core/src/test/java/org/wso2/carbon/identity/core/IdentityKeyStoreResolverTest.java +++ b/components/identity-core/org.wso2.carbon.identity.core/src/test/java/org/wso2/carbon/identity/core/IdentityKeyStoreResolverTest.java @@ -166,8 +166,7 @@ public String[] missingConfigDataProvider() { return new String[] { "identity_err1.xml", - "identity_err2.xml", - "identity.xml" // Finally loading correct identity.xml file to be used for other tests. + "identity_err2.xml" }; } @@ -175,7 +174,7 @@ public String[] missingConfigDataProvider() { public void testMissingConfigs(String fileName) { try { - // Set instance to null for creating a new instance + // Set current instance to null before creating a new instance Field identityKeyStoreResolverInstance = IdentityKeyStoreResolver.class.getDeclaredField("instance"); identityKeyStoreResolverInstance.setAccessible(true); identityKeyStoreResolverInstance.set(null, null); @@ -191,7 +190,7 @@ public void testMissingConfigs(String fileName) { // Test instance creation --> Config read. IdentityKeyStoreResolver.getInstance(); } catch (Exception e) { - fail(); + fail("Test failed due to exception: " + e); } } @@ -268,5 +267,4 @@ private void setPrivateStaticField(Class clazz, String fieldName, Object newV field.setAccessible(true); field.set(null, newValue); } - }