@Test void onMessage() { webSocketEndpoint.onMessage("Message!", "user2"); Mockito.verify(broadcaster).broadcast(">> user2: Message!"); }
@OnMessage public void onMessage(String message, @PathParam("username") String username) { broadcaster.broadcast(">> " + username + ": " + message); LOGGER.info(username + " send message: " + message); }
WebSocketEndpoint { @OnMessage public void onMessage(String message, @PathParam("username") String username) { broadcaster.broadcast(">> " + username + ": " + message); LOGGER.info(username + " send message: " + message); } }
WebSocketEndpoint { @OnMessage public void onMessage(String message, @PathParam("username") String username) { broadcaster.broadcast(">> " + username + ": " + message); LOGGER.info(username + " send message: " + message); }  }
WebSocketEndpoint { @OnMessage public void onMessage(String message, @PathParam("username") String username) { broadcaster.broadcast(">> " + username + ": " + message); LOGGER.info(username + " send message: " + message); }  @OnOpen void onOpen(Session session, @PathParam("username") String username); @OnClose void onClose(Session session, @PathParam("username") String username); @OnError void onError(Session session, @PathParam("username") String username, Throwable throwable); @OnMessage void onMessage(String message, @PathParam("username") String username); }
WebSocketEndpoint { @OnMessage public void onMessage(String message, @PathParam("username") String username) { broadcaster.broadcast(">> " + username + ": " + message); LOGGER.info(username + " send message: " + message); }  @OnOpen void onOpen(Session session, @PathParam("username") String username); @OnClose void onClose(Session session, @PathParam("username") String username); @OnError void onError(Session session, @PathParam("username") String username, Throwable throwable); @OnMessage void onMessage(String message, @PathParam("username") String username);  }