@Test public void test_onApplicationEvent_resolve_with_custom_message() { notifier.setMessage("TEST"); StepVerifier.create(notifier.notify( new InstanceStatusChangedEvent(instance.getId(), instance.getVersion(), StatusInfo.ofDown()))) .verifyComplete(); clearInvocations(restTemplate); StepVerifier.create( notifier.notify(new InstanceStatusChangedEvent(instance.getId(), instance.getVersion(), StatusInfo.ofUp()))) .verifyComplete(); HttpEntity<?> expected = expectedMessage("TEST"); verify(restTemplate).exchange(eq(URI.create(String.format("%s/rooms/%s/messages", host, room))), eq(HttpMethod.POST), eq(expected), eq(Void.class)); }
public void setMessage(String message) { this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION); }
LetsChatNotifier extends AbstractStatusChangeNotifier { public void setMessage(String message) { this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION); } }
LetsChatNotifier extends AbstractStatusChangeNotifier { public void setMessage(String message) { this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION); } LetsChatNotifier(InstanceRepository repository); }
LetsChatNotifier extends AbstractStatusChangeNotifier { public void setMessage(String message) { this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION); } LetsChatNotifier(InstanceRepository repository); void setRestTemplate(RestTemplate restTemplate); void setUrl(@Nullable URI url); @Nullable URI getUrl(); void setUsername(String username); String getUsername(); void setRoom(@Nullable String room); @Nullable String getRoom(); void setToken(@Nullable String token); @Nullable String getToken(); void setMessage(String message); String getMessage(); }
LetsChatNotifier extends AbstractStatusChangeNotifier { public void setMessage(String message) { this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION); } LetsChatNotifier(InstanceRepository repository); void setRestTemplate(RestTemplate restTemplate); void setUrl(@Nullable URI url); @Nullable URI getUrl(); void setUsername(String username); String getUsername(); void setRoom(@Nullable String room); @Nullable String getRoom(); void setToken(@Nullable String token); @Nullable String getToken(); void setMessage(String message); String getMessage();  }