Decouple tests from implementation