Decouple tests from implementation, ch8ex2