Tests for handshake and parsing incoming packets