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

    -- Plan the tests.

    SELECT plan(12);

    -- Add data

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

    -- Validate required tables

--    SELECT has_table('business');

    -- Validate required functions

    SELECT has_function('array_endswith',ARRAY['anyelement','anyarray']);
    SELECT has_function('array_splice_from',ARRAY['anyelement','anyarray']);
    SELECT has_function('array_splice_to',ARRAY['anyelement','anyarray']);
    SELECT has_function('get_default_lang','{}'::text[]);
    SELECT has_function('in_tree',ARRAY['integer','tree_record[]']);
    SELECT has_function('in_tree',ARRAY['integer[]','tree_record[]']);
    SELECT has_function('invoice__get_by_vendor_number',ARRAY['text','text']);
    SELECT has_function('lsmb__decompose_timestamp',ARRAY['timestamp with time zone']);
    SELECT has_function('lsmb__max_date','{}'::text[]);
    SELECT has_function('lsmb__min_date','{}'::text[]);
    SELECT has_function('parse_date',ARRAY['date']);
    SELECT has_function('warehouse__list_all','{}'::text[]);

    -- Run tests

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

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

ROLLBACK;
