Partial impl of some test code