Improve test case for invalid secret handshakes