refine utest, move the mock io to handshake where actually use it.