improved unittests in database class