Refactor server tests to add sync object for server shutdown; fix classforname order in database manager class.