}
@Test
public void testStoreStates1() {
StoreArrayOfCharArrays backing = new StoreArrayOfCharArrays();
StoreStates store = new StoreStates(backing);
store.test();
// creating a StoreStates object also creates the initial state, so the first
// index must be 5
int s1 = store.newCharMapState();
assertEquals(5,s1);
// also the initial state must have index 0
assertEquals(0,store.initialState);
int s2 = store.newCharMapState();
assertEquals(10,s2);
int s3 = store.newSingleCharState();
assertEquals(15,s3);
assertEquals(true,store.getIsCharMapState(s1));
assertEquals(true,store.getIsCharMapState(s2));
assertEquals(false,store.getIsCharMapState(s3));
store.setLookupIndex(s1, 123);
store.setLookupIndex(s2, 234);
store.setLookupIndex(s3, 345);
assertEquals(true,store.getIsCharMapState(s1));
assertEquals(true,store.getIsCharMapState(s2));
assertEquals(false,store.getIsCharMapState(s3));
assertEquals(123,store.getLookupIndex(s1));
assertEquals(234,store.getLookupIndex(s2));
assertEquals(345,store.getLookupIndex(s3));
assertEquals(-1,store.getCharMapIndex(s1));
assertEquals(-1,store.getCharMapIndex(s2));
assertEquals(0,store.getSingleCharStateChar(s3));
store.put(store.initialState, 'a', s1);
store.put(store.initialState, 'b', s2);
store.put(store.initialState, 'c', s3);
assertEquals(s1,store.next(store.initialState, 'a'));
assertEquals(s2,store.next(store.initialState, 'b'));
assertEquals(s3,store.next(store.initialState, 'c'));
}