Utils { public static String argNameValuePairsToString(List<String> args) { if (args == null) { return UNKNOWN; } StringBuilder sb = new StringBuilder(); sb.append("=== Parameters ===").append(LINE_SEPARATOR); for (String str : args) { sb.append(str).append(LINE_SEPARATOR); } return sb.append(LINE_SEPARATOR).toString(); }  static Map<Throwable, AutomonExpirable> createExceptionMap(); static String getLabel(Throwable throwable); static String getLabel(JoinPoint.StaticPart jp); static String formatExceptionForToolsWithLimitedCharacterSet(String exceptionLabel); static List<String> getArgNameValuePairs(JoinPoint jp); static String argNameValuePairsToString(List<String> args); static String toStringWithLimit(Object parameter); static String getExceptionTrace(Throwable exception); static String[] tokenize(String string, String splitOn); static String stripFileScheme(String fileName); static AutomonMXBean getAutomonMxBean(Object aspect); static void registerWithJmx(Object aspect, AutomonMXBean mxBean); static void unregisterWithJmx(Object aspect); static boolean hasPackageName(String className); static T createFirst(String... classNames); static void removeClassNames(List<String> list); static final String LINE_SEPARATOR; }
@Test public void testArgNameValuePairsToString() throws Exception { List<String> args = new ArrayList<String>(); assertThat(Utils.argNameValuePairsToString(null)).isEqualTo(Utils.UNKNOWN); assertThat(Utils.argNameValuePairsToString(args)).contains("Parameter"); args.add("fname: Steve"); args.add("lname: Souza"); assertThat(Utils.argNameValuePairsToString(args)).contains("Parameter", "fname: Steve", "lname: Souza"); }