### Question:
Anagram { public static boolean isAnagram(String first, String second) { if (first == null || second == null) { throw new IllegalArgumentException("Input arguments cannot be null"); } if (first.length() != second.length()) { return false; } int[] occurrences = new int[256]; for (int i = 0; i < first.length(); i++) { int pos = first.charAt(i); if (pos < 0 || pos > 255) { throw new IllegalArgumentException("First string contains non-ASCII code at position #" + i); } occurrences[pos]++; } for (int i = 0; i < second.length(); i++) { int pos = second.charAt(i); if (pos < 0 || pos > 255) { throw new IllegalArgumentException("Second string contains non-ASCII code at position #" + i); } occurrences[pos]--; if (occurrences[pos] < 0) { return false; } } return true; }  static boolean isAnagram(String first, String second);  }### Answer:
@Test public void testIsAnagram4() { assertTrue(isAnagram("abcda", "aabdc")); }
@Test public void testIsAnagram5() { assertTrue(isAnagram("abcdaxzx", "axabzdcx")); }
@Test public void testIsAnagram6() { assertFalse(isAnagram("abc123daxzxx", "213axabzdcx1")); }
@Test public void testIsAnagram7() { assertTrue(isAnagram("" + (char) (0) + (char) (255), "" + (char) (0) + (char) (255))); }
@Test(expected = IllegalArgumentException.class) public void testIsAnagramNullFirstArgument() { isAnagram(null, "abc"); }
@Test(expected = IllegalArgumentException.class) public void testIsAnagramNullSecondArgument() { isAnagram("abc", null); }
@Test(expected = IllegalArgumentException.class) public void testIsAnagramFirstArgumentNonASCII() { isAnagram("abc" + NON_ASCII_CHAR, "abcd"); }
@Test(expected = IllegalArgumentException.class) public void testIsAnagramSecondArgumentNonASCII() { isAnagram("abcd", "abc" + NON_ASCII_CHAR); }
@Test public void testIsAnagramDifferentLenght() { assertFalse(isAnagram("abcd", "abcde")); }
@Test public void testIsAnagram1() { assertFalse(isAnagram("abcd", "abcde")); }
@Test public void testIsAnagram2() { assertFalse(isAnagram("abcd", "xbcd")); }
@Test public void testIsAnagram3() { assertFalse(isAnagram("abcd", "abCd")); }