Added Connection class test + fix exception issue