1010import org .maproulette .client .model .PointInformation ;
1111import org .maproulette .client .model .Task ;
1212import org .maproulette .client .model .TaskStatus ;
13-
14- import com .fasterxml .jackson .databind .ObjectMapper ;
13+ import org .maproulette .client .utilities .ObjectMapperSingleton ;
1514
1615/**
1716 * @author mcuthbert
@@ -22,7 +21,7 @@ public class TaskSerializerTest
2221 public void serializationTest () throws IOException
2322 {
2423 final var testFeatureString = "{\" type\" :\" Feature\" ,\" geometry\" :{\" type\" :\" Point\" ,\" coordinates\" :[%s, %s]},\" properties\" : {\" name\" :\" %s\" }}" ;
25- final var mapper = new ObjectMapper ();
24+ final var mapper = ObjectMapperSingleton . getMapper ();
2625 final var pointList = Arrays .asList (new PointInformation (1.0 , 2.0 ),
2726 new PointInformation (5.4 , 8.7 ));
2827
@@ -41,7 +40,7 @@ public void serializationTest() throws IOException
4140 public void geometriesSerializationTest () throws IOException
4241 {
4342 final var testFeatureString = "{\" type\" :\" Feature\" ,\" geometry\" :{\" type\" :\" Point\" ,\" coordinates\" :[%s, %s]},\" properties\" : {\" name\" :\" %s\" }}" ;
44- final var mapper = new ObjectMapper ();
43+ final var mapper = ObjectMapperSingleton . getMapper ();
4544 final var task = Task .builder (343444454 , "TestTask" ).id (12355655 )
4645 .instruction ("TestInstruction" ).priority (ChallengePriority .HIGH )
4746 .status (TaskStatus .DELETED )
@@ -56,7 +55,7 @@ public void geometriesSerializationTest() throws IOException
5655 public void fromJsonTest () throws Exception
5756 {
5857 final var testFeatureString = "{\" type\" :\" Feature\" ,\" geometry\" :{\" type\" :\" Point\" ,\" coordinates\" :[%s, %s]},\" properties\" : {\" name\" :\" %s\" }}" ;
59- final var mapper = new ObjectMapper ();
58+ final var mapper = ObjectMapperSingleton . getMapper ();
6059 final var pointList = Arrays .asList (new PointInformation (1.0 , 2.0 ),
6160 new PointInformation (5.4 , 8.7 ));
6261
0 commit comments