diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java index a718c9c..d303b4c 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/query/QueryTest.java @@ -120,12 +120,13 @@ public class QueryTest extends ERManagementTest { json = isRelatedToManagement.all(true); - List resourcesList = ElementMapper.unmarshalList(Resource.class, json); + @SuppressWarnings("rawtypes") + List resourcesList = ElementMapper.unmarshalList(IsRelatedTo.class, json); logger.debug("{} are {} : {} ", IsRelatedTo.NAME, resourcesList.size(), resourcesList); Assert.assertTrue(resourcesList.size() == MAX); json = isRelatedToManagement.all(false); - resourcesList = ElementMapper.unmarshalList(Resource.class, json); + resourcesList = ElementMapper.unmarshalList(IsRelatedTo.class, json); Assert.assertTrue(resourcesList.size() == 0); /* Getting all ConsistsOf polymorphic and non polymorphic */ @@ -134,12 +135,14 @@ public class QueryTest extends ERManagementTest { .getERManagement(ConsistsOf.NAME); json = consistsOfManagement.all(true); - List consistsOfPolimorphicList = ElementMapper.unmarshalList(Resource.class, json); - logger.debug("{} are {} : {} ", IsRelatedTo.NAME, consistsOfPolimorphicList.size(), consistsOfPolimorphicList); + @SuppressWarnings("rawtypes") + List consistsOfPolimorphicList = ElementMapper.unmarshalList(ConsistsOf.class, json); + logger.debug("{} are {} : {} ", ConsistsOf.NAME, consistsOfPolimorphicList.size(), consistsOfPolimorphicList); json = consistsOfManagement.all(false); - List consistsOfNonPolimorphicList = ElementMapper.unmarshalList(Resource.class, json); - logger.debug("{} are {} : {} ", IsRelatedTo.NAME, consistsOfNonPolimorphicList.size(), + @SuppressWarnings("rawtypes") + List consistsOfNonPolimorphicList = ElementMapper.unmarshalList(ConsistsOf.class, json); + logger.debug("{} are {} : {} ", ConsistsOf.NAME, consistsOfNonPolimorphicList.size(), consistsOfNonPolimorphicList); Assert.assertTrue(consistsOfPolimorphicList.size() >= consistsOfNonPolimorphicList.size());