Convert Mock Server/Client to use condition vars