OutputStreamFormater { public static String spaces(int nb) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < nb; i++) { sb.append(' '); } return sb.toString(); } private  OutputStreamFormater(); static void printValue(String name, String value); static void printValuesWithPrefix(String pref, String name, String value); static void printTabbedValues(int spaces, String name, String value); static String formatValues(String name, String value); static String formatValues(String pref, String name, String value); static String spaces(int nb); static void printValue(String value); static String formatValues(int spaces, String id, String status); static void setOutputStream(PrintStream outputStream); static void setPadding(int padding);  }
@Test public void testSpaces_shouldInsertSpaces() throws Exception { assertThat(OutputStreamFormater.spaces(20).length(), is(20)); }