@Test
public void testCreate() throws QueryBuildException {

    PostgresSchema.create(statement, collection, null);
    assertEquals(
            "CREATE OR REPLACE FUNCTION parse_timestamp_immutable(source jsonb) RETURNS timestamptz AS $$ " +
                    "BEGIN RETURN source::text::timestamptz; END; " +
                    "$$ LANGUAGE 'plpgsql' IMMUTABLE;\n" +
            "CREATE OR REPLACE FUNCTION bigint_to_jsonb_immutable(source bigint) RETURNS jsonb AS $$ " +
                "BEGIN RETURN to_json(source)::jsonb; END; " +
                "$$ LANGUAGE 'plpgsql' IMMUTABLE;\n" +
            "CREATE TABLE test_collection (document jsonb NOT NULL);\n" +
            "CREATE UNIQUE INDEX test_collection_pkey ON test_collection USING BTREE ((document#>'{test_collectionID}'));\n",
            body.toString());
}