### Question:
StringUtils { public static String leftPad(String str, int size) { return leftPad(str, size, ' '); }  static boolean isEmpty(String str); static String leftPad(String str, int size); static String leftPad(String str, int size, char padChar); static String leftPad(String str, int size, String padStr); static String padding(int repeat, char padChar);  }### Answer:
@Test public void leftPad() { Assert.assertNull(StringUtils.leftPad(null, 9)); Assert.assertEquals(" ", StringUtils.leftPad("", 3)); Assert.assertEquals("bat", StringUtils.leftPad("bat", 3)); Assert.assertEquals(" bat", StringUtils.leftPad("bat", 5)); Assert.assertEquals("bat", StringUtils.leftPad("bat", 1)); Assert.assertEquals("bat", StringUtils.leftPad("bat", -1)); Assert.assertEquals(8193, StringUtils.leftPad("", 8193).length()); Assert.assertNull(StringUtils.leftPad(null, 9, "ddd")); Assert.assertEquals("zzz", StringUtils.leftPad("", 3, "z")); Assert.assertEquals("bat", StringUtils.leftPad("bat", 3, "yz")); Assert.assertEquals("yzbat", StringUtils.leftPad("bat", 5, "yz")); Assert.assertEquals("yzyzybat", StringUtils.leftPad("bat", 8, "yz")); Assert.assertEquals("bat", StringUtils.leftPad("bat", 1, "yz")); Assert.assertEquals("bat", StringUtils.leftPad("bat", -1, "yz")); Assert.assertEquals(" bat", StringUtils.leftPad("bat", 5, null)); Assert.assertEquals(" bat", StringUtils.leftPad("bat", 5, "")); }