Use a connection factory to generate connections
add test for number of times factory is called