implemented database connection and junit test