Refactor tests for connection & cylon