Q:

How to test ServerEndPoint, ClientEndPoint?

I have implemented ServerEndPoint and ClientEndPoint, how can i test it?
For example, i have Connection wrappers over Session and i want to test it behavior which depends on session data, also i want to test messaging between client and server.
Note that i don't have any war or any of application configuration such as web.xml, web-sockets infrastructure going to be used in another place, all what i have is mapped ServerEndPoint and ClientEndPoint implementations.

A:

The Tyrus reference implementation has a test tools package which contains a test server that can be used with a client: http://mvnrepository.com/artifact/org.glassfish.tyrus.tests/tyrus-test-tools/1.10
The samples on Github are a good usage guide: https://github.com/tyrus-project/tyrus/blob/master/archetypes/echo/src/main/resources/archetype-resources/src/test/java/EchoTest.java

