More test code. Handshake semi-completed