### Question:
MicrosoftTeamsNotifier extends AbstractStatusChangeNotifier { @Override protected boolean shouldNotify(InstanceEvent event, Instance instance) { return event instanceof InstanceRegisteredEvent || event instanceof InstanceDeregisteredEvent || super.shouldNotify(event, instance); } MicrosoftTeamsNotifier(InstanceRepository repository, RestTemplate restTemplate); void setWebhookUrl(@Nullable URI webhookUrl); @Nullable URI getWebhookUrl(); void setThemeColor(String themeColor); String getThemeColor(); String getDeregisterActivitySubtitlePattern(); void setDeregisterActivitySubtitlePattern(String deregisterActivitySubtitlePattern); String getRegisterActivitySubtitlePattern(); void setRegisterActivitySubtitlePattern(String registerActivitySubtitlePattern); String getStatusActivitySubtitlePattern(); void setStatusActivitySubtitlePattern(String statusActivitySubtitlePattern); String getDeRegisteredTitle(); void setDeRegisteredTitle(String deRegisteredTitle); String getRegisteredTitle(); void setRegisteredTitle(String registeredTitle); String getStatusChangedTitle(); void setStatusChangedTitle(String statusChangedTitle); String getMessageSummary(); void setMessageSummary(String messageSummary); void setRestTemplate(RestTemplate restTemplate);  }### Answer:
@Test public void test_shouldNotifyWithRegisteredEventReturns_true() { InstanceRegisteredEvent event = new InstanceRegisteredEvent(instance.getId(), 1L, instance.getRegistration()); assertThat(notifier.shouldNotify(event, instance)).isTrue(); }
@Test public void test_shouldNotifyWithDeRegisteredEventReturns_true() { InstanceDeregisteredEvent event = new InstanceDeregisteredEvent(instance.getId(), 1L); assertThat(notifier.shouldNotify(event, instance)).isTrue(); }