Implemented both connect methods for JUnit and pooling