@@ -0,0 +1,3894 @@
+package com.kii.thingif.trigger;%0A%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.GsonBuilder;%0Aimport com.kii.thingif.ServerError;%0Aimport com.kii.thingif.SmallTestBase;%0Aimport com.kii.thingif.utils.JsonUtil;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONObject;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.robolectric.RobolectricTestRunner;%0A%0A@RunWith(RobolectricTestRunner.class)%0Apublic class TriggeredServerCodeResultAdapterTest extends SmallTestBase%7B%0A    Gson gson = new GsonBuilder()%0A            .registerTypeAdapter(%0A                    TriggeredServerCodeResult.class,%0A                    new TriggeredServerCodeResultAdapter())%0A            .create();%0A    @Test%0A    public void deserializationTest() throws Exception %7B%0A        TriggeredServerCodeResult%5B%5D expectedResults = %7B%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        new JSONObject().put(%22k%22, %22v%22),%0A                        System.currentTimeMillis(),%0A                        %22endpoint1%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        new JSONArray()%0A                                .put(new JSONObject().put(%22key1%22, %22value1%22))%0A                                .put(new JSONObject().put(%22key2%22, %22value2%22)),%0A                        System.currentTimeMillis(),%0A                        %22endpoint2%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        %22a string%22,%0A                        System.currentTimeMillis(),%0A                        %22endpoint3%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        %22%22,%0A                        System.currentTimeMillis(),%0A                        %22endpoint4%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        34,%0A                        System.currentTimeMillis(),%0A                        %22endpoint5%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        (long)456,%0A                        System.currentTimeMillis(),%0A                        %22endpoint6%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        (double)45,%0A                        System.currentTimeMillis(),%0A                        %22endpoint7%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        true,%0A                        System.currentTimeMillis(),%0A                        %22endpoint8%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        true,%0A                        null,%0A                        System.currentTimeMillis(),%0A                        %22endpoint9%22,%0A                        null),%0A                new TriggeredServerCodeResult(%0A                        false,%0A                        null,%0A                        System.currentTimeMillis(),%0A                        %22endpoint10%22,%0A                        new ServerError(%22error found%22, %22RUNTIME_ERROR%22, %22faital error%22))%0A        %7D;%0A%0A        for (int i=0; i%3CexpectedResults.length; i++) %7B%0A            TriggeredServerCodeResult expectedResult = expectedResults%5Bi%5D;%0A            TriggeredServerCodeResult deserializedResult = this.gson.fromJson(%0A                    JsonUtil.triggeredServerCodeResultToJson(expectedResult).toString(),%0A                    TriggeredServerCodeResult.class);%0A            assertSameTriggeredServerCodeResults(%0A                    %22failed on %5B%22+i+%22%5D%22,%0A                    expectedResult,%0A                    deserializedResult);%0A        %7D%0A    %7D%0A%0A%7D%0A

Add small tests