@Test public void testGreeting(@Mocked Thread unused, @Mocked RegistrationMessage mockRegistrationMessage) { try { testStompController.greeting(mockRegistrationMessage); } catch (InterruptedException e) { fail("Unexpected exception testing greeting method: " + e); } try { new Verifications() {{ mockRegistrationMessage.getName(); times = 1; Thread.sleep(anyLong); }}; } catch (InterruptedException e) { fail("Unexpected exception in verifications block: " + e); } }
@MessageMapping("/connect") @SendTo("/topic/StompContent") public StompContent greeting(RegistrationMessage message) throws InterruptedException { Thread.sleep(10); return new StompContent(message.getName()); }
StompController { @MessageMapping("/connect") @SendTo("/topic/StompContent") public StompContent greeting(RegistrationMessage message) throws InterruptedException { Thread.sleep(10); return new StompContent(message.getName()); } }
StompController { @MessageMapping("/connect") @SendTo("/topic/StompContent") public StompContent greeting(RegistrationMessage message) throws InterruptedException { Thread.sleep(10); return new StompContent(message.getName()); }  }
StompController { @MessageMapping("/connect") @SendTo("/topic/StompContent") public StompContent greeting(RegistrationMessage message) throws InterruptedException { Thread.sleep(10); return new StompContent(message.getName()); }  @MessageMapping("/connect") @SendTo("/topic/StompContent") StompContent greeting(RegistrationMessage message); @PostMapping(value="/newMessage") @ResponseBody String messages(); @GetMapping("/") String test(); }
StompController { @MessageMapping("/connect") @SendTo("/topic/StompContent") public StompContent greeting(RegistrationMessage message) throws InterruptedException { Thread.sleep(10); return new StompContent(message.getName()); }  @MessageMapping("/connect") @SendTo("/topic/StompContent") StompContent greeting(RegistrationMessage message); @PostMapping(value="/newMessage") @ResponseBody String messages(); @GetMapping("/") String test();  }