Extracted handshake into class, and use it in server tests.
In-process server tests.