Refactor to enable method sharing.
new test method.
connection var should be class for extension.