Utils { protected static String leftPad(String str, int len, String fill) { if (str != null && str.length() < len) { return Strings.padStart(str, len, fill.charAt(0)); } return str == null ? "" : str; } private  Utils(); static String readFile(File file, String charsetName); static String readStream(InputStream is, String charsetName); static void delete(File file); static int toInt(String num, int defaultValue); static int toIntHex(String num, int defaultValue); static long toLong(String num, long defaultValue); static long toLong(Long num, long defaultValue); static float toFloat(String num, float defaultValue); static String getJspEncoding(InputStream is); static void sendFile(HttpServletRequest request, HttpServletResponse response, File file); static Thread getThreadByName(String name); static String highlightStream(String name, InputStream input, String rendererName,
      String encoding); static void sendCompressedFile(HttpServletResponse response, File file); static List<String> getNamesForLocale(String baseName, Locale locale); static boolean isThreadingEnabled();  }
@Test public void leftPadTest() { Assertions.assertEquals("0005", Utils.leftPad("5", 4, "0")); Assertions.assertEquals("5", Utils.leftPad("5", 1, "0")); Assertions.assertEquals("", Utils.leftPad(null, 4, "0")); }