update getDatabases, fix test case