Refactored zmq unit tests and added more tests.