Elixir makes it really easy to roll up a Mock server to test WebSocket clients.
This post discusses about a very high level overview of implementing a long running connection between two services with the use of WebSocket and then writing unit tests for the functionality.
Read next line messaging api client for Elixir