@@ -0,0 +1,1941 @@
+package com.github.nomensvyat.switchbox.parser;%0A%0Aimport com.github.nomensvyat.switchbox.fields.FieldFabric;%0Aimport com.github.nomensvyat.switchbox.fields.UnnamedField;%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.JsonElement;%0Aimport com.google.gson.JsonObject;%0Aimport org.intellij.lang.annotations.Language;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotEquals;%0A%0Apublic class UnnamedFieldDeserializerTest %7B%0A    @Language(%22JSON%22)%0A    private final String legalPropertyJson = %22%7B%5Cn%22 +%0A            %22  %5C%22String%5C%22: %5C%22some string%5C%22,%5Cn%22 +%0A            %22  %5C%22boolean%5C%22: false%5Cn%22 +%0A            %22%7D%22;%0A%0A    @Test%0A    public void testDeserialization() %7B%0A        Gson gson = GsonFabric.create();%0A%0A        JsonObject jsonObject = gson.fromJson(legalPropertyJson, JsonObject.class);%0A%0A        List%3CUnnamedField%3E expectedEquals = new ArrayList%3C%3E();%0A        expectedEquals.add(FieldFabric.create(%22some string%22));%0A        expectedEquals.add(FieldFabric.create(false));%0A%0A        List%3CUnnamedField%3E expectedNotEquals = new ArrayList%3C%3E();%0A        expectedNotEquals.add(FieldFabric.create(%22some other string%22));%0A        expectedNotEquals.add(FieldFabric.create(true));%0A%0A        Iterator%3CUnnamedField%3E iterator = expectedEquals.iterator();%0A        Iterator%3CUnnamedField%3E iteratorNotEquals = expectedNotEquals.iterator();%0A        for (Map.Entry%3CString, JsonElement%3E entry : jsonObject.entrySet()) %7B%0A            String typeName = entry.getKey();%0A            JsonElement jsonElement = entry.getValue();%0A%0A            UnnamedField unnamedField = gson.fromJson(jsonElement, UnnamedField.class);%0A%0A            assertEquals(%22Parsed wrong field%22, iterator.next(), unnamedField);%0A%0A            assertNotEquals(%22Parsed wrong field. Must not be equal%22, iteratorNotEquals.next(), unnamedField);%0A        %7D%0A    %7D%0A%0A%7D

Test UnnamedFieldDeserializer