ArgumentServices { public String getJsonResultFromSpecificMarshallerIterable(Iterable list, IJsonMarshaller marshaller) throws JsonMarshallingException { StringBuilder json = new StringBuilder(); json.append("["); boolean first = true; for (Object object : list) { if (!first) { json.append(","); } json.append(marshaller.toJson(object)); 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 testGetJsonResultFromSpecificMarshallerIterable() throws Exception { System.out.println("getJsonResultFromSpecificMarshallerIterable"); IJsonMarshaller ijm = mock(IJsonMarshaller.class); when(ijm.toJson(anyObject())).thenReturn("\"JSON\""); List<Locale> locales = Arrays.asList(Locale.FRANCE, Locale.US); String result = instance.getJsonResultFromSpecificMarshallerIterable(locales, ijm); assertThat(result).isEqualTo("[\"JSON\",\"JSON\"]"); }