improve text function tests

Change-Id: Ia84fc5fa460dd27955dfc843d29b213b3b40ea46
add tests for database functions

Change-Id: I65f8087772318eb14adc0eb65ab896e57677cbe3
integrate database function test

Change-Id: Ieb21b0a26caabfd3976de0eb20049e8ac8ec8533