Moved the test from store procedures to test.sql