mock server side of handshake