@Test
void testIndexOf() {

	int result = a.indexOf('a');
	assertEquals(0, result);
	Charray abcdefgh = new Charray("abcdefgh");
	result = abcdefgh.indexOf('h');
	assertEquals(abcdefgh.length()-1, result);
	for (char c: Arrays.asList('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h')) {
		assertEquals(c, abcdefgh.get(abcdefgh.indexOf(c)));
	}
	assertEquals(-1, abcdefgh.indexOf('z'));
}