### Question:
Helper { public static String camelCaseToUnderScore(String key) { if (key.isEmpty()) return key; StringBuilder sb = new StringBuilder(key.length()); for (int i = 0; i < key.length(); i++) { char c = key.charAt(i); if (Character.isUpperCase(c)) sb.append("_").append(Character.toLowerCase(c)); else sb.append(c); } return sb.toString(); } private  Helper(); static Locale getLocale(String param); static String toLowerCase(String string); static String toUpperCase(String string); static int countBitValue(int maxTurnCosts); static void saveProperties(Map<String, String> map, Writer tmpWriter); static List<String> readFile(String file); static List<String> readFile(Reader simpleReader); static String isToString(InputStream inputStream); static int idealIntArraySize(int need); static int idealByteArraySize(int need); static boolean removeDir(File file); static long getTotalMB(); static long getUsedMB(); static String getMemInfo(); static int getUsedMBAfterGC(); static int getSizeOfObjectRef(int factor); static int getSizeOfLongArray(int length, int factor); static int getSizeOfObjectArray(int length, int factor); static void close(Closeable cl); static boolean isEmpty(String str); static boolean isFileMapped(ByteBuffer bb); static int calcIndexSize(BBox graphBounds); static String pruneFileEnd(String file); static List<Double> createDoubleList(double[] values); static PointList createPointList(double... list); static PointList createPointList3D(double... list); static int degreeToInt(double deg); static double intToDegree(int storedInt); static int eleToInt(double ele); static double intToEle(int integEle); static String nf(long no); static String firstBig(String sayText); static double keepIn(double value, double min, double max); static double round(double value, int exponent); static double round6(double value); static double round4(double value); static double round2(double value); static DateFormat createFormatter(); static DateFormat createFormatter(String str); static long toUnsignedLong(int x); static int toSignedInt(long x); static String camelCaseToUnderScore(String key); static String underScoreToCamelCase(String key); static String join(String delimiter, List<String> strings); static final DistanceCalc DIST_EARTH; static final DistanceCalc3D DIST_3D; static final DistancePlaneProjection DIST_PLANE; static final AngleCalc ANGLE_CALC; static final Charset UTF_CS; static final TimeZone UTC; static final long MB; }### Answer:
@Test public void testCamelCaseToUnderscore() { assertEquals("test_case", Helper.camelCaseToUnderScore("testCase")); assertEquals("test_case_t_b_d", Helper.camelCaseToUnderScore("testCaseTBD")); assertEquals("_test_case", Helper.camelCaseToUnderScore("TestCase")); assertEquals("_test_case", Helper.camelCaseToUnderScore("_test_case")); }