I have a mina client whose connector is a NioSocketConnector. I have written integration tests of this client with real server. However, I could not find a way to do unit tests. For example, I want to test my custom decoder and encoder works correctly without opening a real socket. And, I want to test my messages are queued correctly in the buffer etc.
I found a DummySession class for testings but I am not sure if this class is enough for a complete unit testing of the client.
Mina suggests unit testing is easy with it so I really wonder how can I do this. Please help with your ideas or links to sample code.
Thanks in advance.