diff --git a/manage-server/src/test/java/manage/control/MetaDataControllerTest.java b/manage-server/src/test/java/manage/control/MetaDataControllerTest.java index 0b18b8cd..699f4e80 100644 --- a/manage-server/src/test/java/manage/control/MetaDataControllerTest.java +++ b/manage-server/src/test/java/manage/control/MetaDataControllerTest.java @@ -988,19 +988,18 @@ public void importFeedIdemPotency() throws IOException { .get("manage/api/client/metadata/saml20_sp/" + id) .getBody() .as(MetaData.class); + Map metaDataFields = metaData.metaDataFields(); + assertEquals("eduGAIN", metaDataFields.get("coin:interfed_source")); + assertEquals(true, metaDataFields.get("coin:imported_from_edugain")); importRequest = new Import(urlS, "https://impacter.eu/sso/metadata"); - result = given() + result= given() .body(importRequest) .header("Content-type", "application/json") .post("manage/api/client/import/endpoint/xml/saml20_sp") .getBody() .as(Map.class); - Set keysFromMetaData = metaData.metaDataFields().keySet(); - Set metaDataFields = ((Map) result.get("metaDataFields")).keySet(); - - keysFromMetaData.removeAll(metaDataFields); - assertEquals(Arrays.asList("coin:imported_from_edugain", "coin:interfed_source"), new ArrayList(keysFromMetaData)); + assertEquals("eduGAIN", ((Map)result.get("metaDataFields")).get("coin:interfed_source")); }