StringUtils { public static String padLeft(String string, char padding, int size) { final StringBuilder pad = new StringBuilder(); while (pad.length() + string.length() < size) { pad.append(padding); } return pad + string; }  static String padLeft(String string,
                                 char padding,
                                 int size);  }
@Test public void properly_pads_empty_string() { final String input = ""; final String expected = "0000"; assertEquals(expected, StringUtils.padLeft(input, '0', 4)); }
@Test public void properly_pads_one_character() { final String input = "000"; final String expected = "0000"; assertEquals(expected, StringUtils.padLeft(input, '0', 4)); }