diff --git a/src/test/java/io/supertokens/test/bulkimport/apis/AddBulkImportUsersTest.java b/src/test/java/io/supertokens/test/bulkimport/apis/AddBulkImportUsersTest.java index 4684b0f92..94ce885b0 100644 --- a/src/test/java/io/supertokens/test/bulkimport/apis/AddBulkImportUsersTest.java +++ b/src/test/java/io/supertokens/test/bulkimport/apis/AddBulkImportUsersTest.java @@ -443,9 +443,8 @@ public void shouldNormaliseFields() throws Exception { JsonArray bulkImportUsers = getResponse.get("users").getAsJsonArray(); assertEquals(1, bulkImportUsers.size()); - JsonParser parser = new JsonParser(); JsonObject bulkImportUserJson = bulkImportUsers.get(0).getAsJsonObject(); - JsonArray loginMethods = parser.parse(bulkImportUserJson.get("rawData").getAsString()).getAsJsonObject().getAsJsonArray("loginMethods"); + JsonArray loginMethods = bulkImportUserJson.getAsJsonArray("loginMethods"); for (int i = 0; i < loginMethods.size(); i++) { JsonObject loginMethod = loginMethods.get(i).getAsJsonObject(); diff --git a/src/test/java/io/supertokens/test/bulkimport/apis/GetBulkImportUsersTest.java b/src/test/java/io/supertokens/test/bulkimport/apis/GetBulkImportUsersTest.java index 77fad9b02..5efb99a58 100644 --- a/src/test/java/io/supertokens/test/bulkimport/apis/GetBulkImportUsersTest.java +++ b/src/test/java/io/supertokens/test/bulkimport/apis/GetBulkImportUsersTest.java @@ -35,6 +35,7 @@ import io.supertokens.ProcessState; import io.supertokens.pluginInterface.STORAGE_TYPE; +import io.supertokens.pluginInterface.bulkimport.BulkImportUser; import io.supertokens.storageLayer.StorageLayer; import io.supertokens.test.TestingProcessManager; import io.supertokens.test.Utils; @@ -150,7 +151,7 @@ public void shouldReturn200Response() throws Exception { assertEquals(1, bulkImportUsers.size()); JsonObject bulkImportUserJson = bulkImportUsers.get(0).getAsJsonObject(); bulkImportUserJson.get("status").getAsString().equals("NEW"); - bulkImportUserJson.get("rawData").getAsString().equals(rawData); + BulkImportUser.fromJson(bulkImportUserJson).toRawData().equals(rawData); process.kill(); Assert.assertNotNull(process.checkOrWaitForEvent(ProcessState.PROCESS_STATE.STOPPED));