Task  #13

Finally add connection test and extract to method checkConnectionDB