[WIP] Extract test functionality

Fix #101.
You’re right. I’m reverting this.