@@ -0,0 +1,1075 @@
+package com.worizon.junit.jsonresponse;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.LinkedHashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport org.junit.Test;%0A%0Aimport com.worizon.jsonrpc.JsonRpcResponse;%0A%0Apublic class JsonRpcMapResponseTest %7B%0A%09%0A%0A%09@Test%0A%09public void testResult() throws Exception%7B%0A%09%09%0A%09%09String message = %22%7B%5C%22jsonrpc%5C%22: %5C%222.0%5C%22, %5C%22result%5C%22: %7B%5C%22x%5C%22:1,%5C%22y%5C%22:%5C%22test%5C%22%7D, %5C%22id%5C%22: 2%7D%22;%09%09%0A%09%09JsonRpcResponse%3CMap%3E res = new JsonRpcResponse%3CMap%3E(message, Map.class);%0A%09%09%0A%09%09HashMap expected = new HashMap()%7B%7B%0A%09%09%09put(%22x%22,1d);%0A%09%09%09put(%22y%22,%22test%22);%0A%09%09%7D%7D;%0A%09%09assertEquals(expected, res.getResult());%09%09%09%0A%09%09assertEquals( 2, res.getId().longValue() );%09%09%09%09%0A%09%09assertEquals(%222.0%22,res.getVersion());%0A%09%09assertNull(res.getError());%09%09%09%0A%09%09%0A%09%7D%0A%09%0A%09@Test%0A%09public void testNull() throws Exception%7B%0A%09%09%0A%09%09String message = %22%7B%5C%22jsonrpc%5C%22: %5C%222.0%5C%22, %5C%22result%5C%22: null, %5C%22id%5C%22: 2%7D%22;%09%09%0A%09%09JsonRpcResponse%3CMap%3E res = new JsonRpcResponse%3CMap%3E(message, Map.class);%0A%09%09%0A%09%09assertNull(res.getResult());%0A%09%09%0A%09%7D%0A%09%09%0A%7D%0A

test from Map return type