Added test for new context.connect() function