tests and implementation for `test/2`