added unit test to conn.rs