BEGIN;
    -- Load the TAP functions.
    CREATE EXTENSION pgtap;
    SET client_min_messages TO warning;

    -- Plan the tests.

    SELECT plan(6);

    -- Add data

    \i xt/data/42-pg/Base.sql

    -- Validate required tables

--    SELECT has_table('business');

    -- Validate required functions

    SELECT has_function('entity_save',ARRAY['integer','text','integer']);
    SELECT has_function('entity__list_classes','{}'::text[]);
    SELECT has_function('entity__get',ARRAY['integer']);
    SELECT has_function('eca__get_entity',ARRAY['integer']);
    SELECT has_function('entity__get_bank_account',ARRAY['integer']);
    SELECT has_function('entity__delete_bank_account',ARRAY['integer','integer']);

    -- Run tests

--    PREPARE test AS select ...;
--    SELECT results_eq('test',result,'Description');
--    DEALLOCATE test;

    -- Finish the tests and clean up.
    SELECT * FROM finish();

ROLLBACK;
