### Question:
CapitalizeFirstFunction implements StringFunction { public String execute(String input) { for (int i = 0; i < input.length(); i++) { final char ch = input.charAt(i); if (!Character.isWhitespace(ch)) { if (Character.isUpperCase(ch)) { return input; } final char[] chars = input.toCharArray(); chars[i] = Character.toUpperCase(ch); return new String(chars); } } return input; }  String execute(String input);  }### Answer:
@Test public void test_execute() { CapitalizeFirstFunction function = new CapitalizeFirstFunction(); assertEquals("Maurice", function.execute("maurice")); assertEquals("MAURICE", function.execute("MAURICE")); assertEquals(" Maurice", function.execute(" maurice")); assertEquals("Maurice zeijen", function.execute("maurice zeijen")); }