added tests for Connection with credentials passed as object