Testing connection chec function