CacheArgumentServices { String processArg(String[] path, String jsonArg) { String keyArg = jsonArg; if (path.length > 0) { try { keyArg = processSubFieldsOfArg(path, jsonArg); } catch (Throwable ex) { logger.warn("Fail to access to field for '{}'", jsonArg, ex); } } return keyArg; }  String computeArgPart(String[] keys, List<String> jsonArgs, List<String> paramNames);  }
@Test public void testProcessArg() { System.out.println("processArg"); String[] path = new String[] {}; doReturn("jsonarg.b").when(instance).processSubFieldsOfArg(any(String[].class), anyString()); String result = instance.processArg(path, "jsonarg"); assertThat(result).isEqualTo("jsonarg"); path = new String[] {"b"}; result = instance.processArg(path, "jsonarg"); assertThat(result).isEqualTo("jsonarg.b"); }