PrettyPrinter { public String formatChangeScriptList(List<ChangeScript> changeScripts) { List<Long> numberList = new ArrayList<Long>(changeScripts.size()); for (ChangeScript changeScript : changeScripts) { numberList.add(changeScript.getId()); } return format(numberList); }  String format(List<Long> appliedChanges); String formatChangeScriptList(List<ChangeScript> changeScripts);  }
@Test public void canFormatAChangeScriptList() throws Exception { ChangeScript change1 = new ChangeScript(1); ChangeScript change3 = new ChangeScript(3); assertEquals("1, 3", prettyPrinter.formatChangeScriptList(Arrays.asList(change1, change3))); }