add initial tests, fix first bug in fake output handler