[WIP] Extract test functionality

Fix #101.
Move to parent.