Added a test and implemented some stuff to test the connection.