@Test public void shouldNotCompressEmptyWordsRecursive() { String wordToCompress = ""; String result = compressString.compressRecursive(wordToCompress); assertEquals("", result); }
public String compressRecursive(String src) { validateInput(src); if (src.length() <= 1) { return src; } return compressRecursiveInner(src, new StringBuilder(), 1, src.charAt(0), 1); }
CompressString { public String compressRecursive(String src) { validateInput(src); if (src.length() <= 1) { return src; } return compressRecursiveInner(src, new StringBuilder(), 1, src.charAt(0), 1); } }
CompressString { public String compressRecursive(String src) { validateInput(src); if (src.length() <= 1) { return src; } return compressRecursiveInner(src, new StringBuilder(), 1, src.charAt(0), 1); }  }
CompressString { public String compressRecursive(String src) { validateInput(src); if (src.length() <= 1) { return src; } return compressRecursiveInner(src, new StringBuilder(), 1, src.charAt(0), 1); }  String compress(String src); String compressRecursive(String src); }
CompressString { public String compressRecursive(String src) { validateInput(src); if (src.length() <= 1) { return src; } return compressRecursiveInner(src, new StringBuilder(), 1, src.charAt(0), 1); }  String compress(String src); String compressRecursive(String src);  }