### Question:
Spelling { boolean isPossible(String word) { boolean possible; int prefixLength = 1; do { possible = possiblePrefixes(word.substring(0, prefixLength)); prefixLength++; } while (possible && prefixLength <= word.length()); return possible; } Spelling(InputStream file);   }### Answer:
@Test public void testAPossible() throws Exception { assertTrue(spelling.isPossible("a")); }
@Test public void testAAPossible() throws Exception { assertTrue(spelling.isPossible("aa")); }
@Test public void testAAAPossible() throws Exception { assertTrue(spelling.isPossible("aaa")); }
@Test public void testAAAAPossible() throws Exception { assertFalse(spelling.isPossible("aaaa")); }
@Test public void testAAAAAPossible() throws Exception { assertFalse(spelling.isPossible("aaaaa")); }
@Test public void testAAAAAAPossible() throws Exception { assertFalse(spelling.isPossible("aaaaaa")); }
@Test public void testAAAAAAAPossible() throws Exception { assertFalse(spelling.isPossible("aaaaaaa")); }