Added more complex functional tests and refactored tests DB
Fix tests DB dump