ArgumentConvertor implements IArgumentConvertor { Class<? extends IJsonMarshaller> getMarshallerAnnotation(Annotation[] annotations) { JsonUnmarshaller ju = getJsonUnmarshallerAnnotation(annotations); return (ju != null) ? ju.value() : null; }  @Override Object convertJsonToJava(String jsonArg, Type paramType, Annotation[] parameterAnnotations);  }
@Test public void testGetMarshallerAnnotation() throws NoSuchMethodException { System.out.println("getMarshallerAnnotation"); doReturn(null).doReturn(JSONUNMARSHALLER).when(instance).getJsonUnmarshallerAnnotation(any(Annotation[].class)); Class result = instance.getMarshallerAnnotation(new Annotation[]{}); assertThat(result).isNull(); result = instance.getMarshallerAnnotation(new Annotation[]{}); assertThat(result).isEqualTo(LocaleMarshaller.class); }
@Test public void testNotGetMarshallerAnnotation() throws NoSuchMethodException { System.out.println("getMarshallerAnnotation"); Class result = instance.getMarshallerAnnotation(new Annotation[]{}); assertThat(result).isEqualTo(null); }