@@ -0,0 +1,1207 @@
+package com.pm.server.utils;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.ArrayList;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class JsonUtilsTest %7B%0A%0A%09private DummyObject dummyObject;%0A%0A%09@Before%0A%09public void setUp() %7B%0A%0A%09%09dummyObject = new DummyObject();%0A%0A%09%7D%0A%0A%09@Test%0A%09public void unitTest_objectToJson() %7B%0A%0A%09%09// Given%0A%09%09Integer arbitraryInteger = 12345;%0A%09%09dummyObject.integer = arbitraryInteger;%0A%0A%09%09String arbitraryString = %22text here%22;%0A%09%09dummyObject.stringArrayList.add(arbitraryString);%0A%0A%09%09// When%0A%09%09String objectString = JsonUtils.objectToJson(dummyObject);%0A%0A%09%09// Then%0A%09%09assertTrue(objectString.contains(%22%7B%22));%0A%09%09assertTrue(objectString.contains(%22%7D%22));%0A%09%09assertTrue(objectString.contains(Integer.toString(arbitraryInteger)));%0A%09%09assertTrue(objectString.contains(arbitraryString));%0A%0A%09%7D%0A%0A%09@Test%0A%09public void unitTest_objectToJson_null() %7B%0A%0A%09%09// Given%0A%09%09dummyObject = null;%0A%0A%09%09// When%0A%09%09String objectString = JsonUtils.objectToJson(dummyObject);%0A%0A%09%09// Then%0A%09%09assertTrue(objectString.equals(%22null%22));%0A%0A%09%7D%0A%0A%09private final class DummyObject %7B%0A%0A%09%09@SuppressWarnings(%22unused%22)%0A%09%09public Integer integer = 0;%0A%0A%09%09public ArrayList%3CString%3E stringArrayList = new ArrayList%3CString%3E();%0A%0A%09%7D%0A%0A%7D

Add unit tests for JsonUtils