added @jasperdk 's test
made fix
changed test setup to be more refactoring-friendly