add test case for closeConnection()
QueryCache: add check before $object-case

To avoid AppIntegration Test to fail
Cleaning and some function-moving
add basic test for createModel