The ultimate scenario would be if I could write something like:
@Test
public void testSomeServerFunc() {
startServer();
call dataAdapter.subscribe(*some data*)
//Have some way of listening to the events that goes to the client
}
From what I have understood, this shouldn't be too hard to accomplish, but I have no idea where to start with Lighstreamer. With Node.js and socket.io for instance, it does not seem that tricky to test a publish-subscribe architecture:
https://github.com/LearnBoost/socket.io/blob/master/test/socket.io.js