ArgumentServices { String getJsonResultFromSpecificMarshallerMap(Map map, IJsonMarshaller marshaller) throws JsonMarshallingException { StringBuilder json = new StringBuilder(); json.append("{"); boolean first = true; for (Map.Entry entry : (Set<Map.Entry>) map.entrySet()) { if (!first) { json.append(","); } json.append("\"").append(entry.getKey()).append("\"").append(":"); json.append(marshaller.toJson(entry.getValue())); first = false; } json.append("}"); return json.toString(); }  List<String> getJsonParameters(Object[] parameters, Annotation[][] annotationss); IJsonMarshaller getIJsonMarshallerInstance(Class<? extends IJsonMarshaller> cls); String getJsonResultFromSpecificMarshaller(JsonMarshaller jm, Object result); String getJsonResultFromSpecificMarshallerIterable(Iterable list, IJsonMarshaller marshaller); List getJavaResultFromSpecificUnmarshallerIterable(String json, IJsonMarshaller marshaller); Map getJavaResultFromSpecificUnmarshallerMap(String json, IJsonMarshaller marshaller); void checkType(Object object, Type paramType);  }
@Test public void testGetJsonResultFromSpecificMarshallerMap() throws Exception { System.out.println("getJsonResultFromSpecificMarshallerMap"); IJsonMarshaller ijm = mock(IJsonMarshaller.class); when(ijm.toJson(anyObject())).thenReturn("\"JSON\""); String result = instance.getJsonResultFromSpecificMarshallerMap(getMapOfLocale(), ijm); assertThat(result).isEqualTo("{\"FR\":\"JSON\",\"US\":\"JSON\"}"); }