[WIP] Extract test functionality

Fix #101.
Could be moved to abstract parent.