MessagingUtils { @Contract(pure = true) public static String getTopic(String topicRoot, long sessionId) { return topicRoot + sessionId; } @Autowired  MessagingUtils(SessionManager sessionManager, Clock clock, SimpMessagingTemplate template); @Contract(pure = true) static String getTopic(String topicRoot, long sessionId); void sendResultsMessage(long sessionId); void sendUsersMessage(long sessionId); @Async void burstResultsMessages(long sessionId); @Async void burstUsersMessages(long sessionId); static final String TOPIC_RESULTS; static final String TOPIC_USERS; static final String TOPIC_ITEM; }
@Test public void testGetTopic() throws Exception { final String result = MessagingUtils.getTopic("/topic/root/", 1L); assertEquals("/topic/root/1", result); }