ArgCleanerDecorator implements IArgumentConvertor { @Override public Object convertJsonToJava(String jsonArg, Type paramType, Annotation[] parameterAnnotations) throws JsonUnmarshallingException, JsonMarshallerException { return argumentConvertor.convertJsonToJava(cleaner.cleanArg(jsonArg), paramType, parameterAnnotations); }  @Override Object convertJsonToJava(String jsonArg, Type paramType, Annotation[] parameterAnnotations);  }
@Test public void testConvertJsonToJava() throws Exception { System.out.println("convertJsonToJava"); when(argumentConvertor.convertJsonToJava(anyString(), any(Type.class), any(Annotation[].class))).thenReturn("OK"); when(cleaner.cleanArg(anyString())).thenReturn(null); Object result = instance.convertJsonToJava("", null, null); assertThat(result).isEqualTo("OK"); }