Anagrams { public List<String> anagram(String input) { final List<String> anagrams = new ArrayList<String>(); char[] chars = input.toCharArray(); String reverse = getReverse(chars); anagrams.add(reverse); String twoIsStart = getTwoIsStart(chars); anagrams.add(twoIsStart); return anagrams; }  List<String> anagram(String input);  }
@Test public void testReverseInput2CharAnagram() throws Exception { Anagrams anagrams = new Anagrams(); assertThat(anagrams.anagram("bi")).contains("ib"); }
@Test public void testReverseInput3CharAnagram() throws Exception { Anagrams anagrams = new Anagrams(); assertThat(anagrams.anagram("bir")).contains("rib"); }
@Test public void testRepositionTwoIsStartInput3CharAnagram() throws Exception { Anagrams anagrams = new Anagrams(); assertThat(anagrams.anagram("bir")).contains("irb"); }