### Question:
Lang { public static String RPAD(String str, int len) { if (str == null) { return ""; } int padLen = len - str.length(); if (padLen < 0) { return str.substring(0, len); } StringBuffer sb = new StringBuffer(str); for (int i = 0; i < padLen; i++) { sb.append(' '); } return sb.toString(); }  static String RPAD(String str, int len); static String RPAD(String str, char c, int len); static String LPAD(String str, int len); static String LPAD(String str, char c, int len); static String truncate(String str, int len); static T NVL(T first, T second); static int linearSearch(Object[] oArray, Object obj); static int linearSearch(Iterable<?> oArray, Object obj); static boolean isInteger(String s); static boolean isDouble(String s); static String stringList(Object[] array, String separator); static String stringList(Iterable<?> array, String separator); static String dblStr(double x); static String milliStr(long milliseconds); static T setAtFill(List<T> list, int ndx, T item); static String getClasspath(); static void addPath(URLClassLoader urlClassLoader, URL u); static void loadedDependencies(String verboseclassOut); static String stackString(Throwable t); static String urlEncode(String preEncode); static String fullURLEncode(String preEncode); static String urlDecode(String encoded); static T error(Throwable t); static T deepCopy(T obj); static final String pWhite_Space; }### Answer:
@Test public void testRPADStringCharInt() { assertEquals("ThisI", Lang.RPAD("ThisIsAString", ' ', 5)); assertEquals("ThisI", Lang.RPAD("ThisI", ' ', 5)); assertEquals("This ", Lang.RPAD("This", ' ', 5)); assertEquals(" ", Lang.RPAD("", ' ', 5)); assertEquals(null, Lang.RPAD(null, ' ', 5)); assertEquals("This#", Lang.RPAD("This", '#', 5)); }