Here you can find the source of decamelise(String testName)
public static String decamelise(String testName)
//package com.java2s; public class Main { public static String decamelise(String testName) { String nocamel = charAtToUpper(0, testName); for (int i = 1; i < testName.length(); i++) { char nextChar = testName.charAt(i); if (isUpper(nextChar)) { nocamel += spaceAndToLower(nextChar); } else { nocamel += nextChar;/*from w w w. j a v a 2s . c o m*/ } } return nocamel; } private static String charAtToUpper(int at, String text) { return (text.charAt(at) + "").toUpperCase(); } private static boolean isUpper(char nextChar) { return nextChar >= 'A' && nextChar <= 'Z'; } private static String spaceAndToLower(char character) { return " " + (character + "").toLowerCase(); } }