JUnit test for the connection class. Not 100% code coverage because 
threads and io exceptions.