Added tests for (check) function.