diff --git a/src/test/java/org/gcube/data_catalogue/grsf_publish_ws/JTests.java b/src/test/java/org/gcube/data_catalogue/grsf_publish_ws/JTests.java index 8a654ea..816249f 100644 --- a/src/test/java/org/gcube/data_catalogue/grsf_publish_ws/JTests.java +++ b/src/test/java/org/gcube/data_catalogue/grsf_publish_ws/JTests.java @@ -113,17 +113,18 @@ public class JTests { HashMap extras = new HashMap(); extras.put("test1", "testValue"); extras.put("test2", "test2Value"); - recordFishery.setProperties(extras); + extras.put("type", "Polygon"); + extras.put("coordinates", "[[[2.05827, 49.8625],[2.05827, 55.7447], [-6.41736, 55.7447], [-6.41736, 49.8625], [2.05827, 49.8625]]]"); + recordFishery.setExtras(extras); ObjectMapper mapper = new ObjectMapper(); //Object to JSON in String String jsonInString = mapper.writeValueAsString(recordFishery); - System.out.println(jsonInString); - + + // JSON back to object FisheryRecord converted = mapper.readValue(jsonInString, recordFishery.getClass()); - System.out.println(converted); }