### Question:
ServiceAlertSubscription implements Serializable { public void send(Map<String, ServiceAlertBean> serviceAlerts, Collection<String> deletedIds, String environment) throws Exception { send(serviceAlerts.values(), deletedIds, environment); }  Integer getId(); void setId(Integer id); String getAddress(); void setAddress(String address); String getSubscriptionIdentifier(); void setSubscriptionIdentifier(String subscriptionIdentifier); Date getCreatedAt(); void setCreatedAt(Date createdAt); String getSubscriptionRef(); void setSubscriptionRef(String subscriptionRef); void send(Map<String, ServiceAlertBean> serviceAlerts, Collection<String> deletedIds, String environment); void send(Collection<ServiceAlertBean> collection,
      Collection<String> deletedIds, String environment); WebResourceWrapper getWebResourceWrapper(); void setWebResourceWrapper(WebResourceWrapper webResourceWrapper); Integer getConsecutiveFailures(); void setConsecutiveFailures(Integer consecutiveFailures); void updateFrom(ServiceAlertSubscription s);  }### Answer:
@Test public void testSend() throws Exception { WebResourceWrapper webResourceWrapper = mock(WebResourceWrapper.class); setWebResourceWrapper(webResourceWrapper); setAddress(TEST_ADDRESS); SituationExchangeResults results = mock(SituationExchangeResults.class); List<DeliveryResult> deliveryResults = new ArrayList<DeliveryResult>(); when(results.getDelivery()).thenReturn(deliveryResults); DeliveryResult deliveryResult = new DeliveryResult(); List<PtSituationElementResult> ptSituationElements = new ArrayList<PtSituationElementResult>(); PtSituationElementResult e = new PtSituationElementResult(); ptSituationElements.add(e); e.id = TEST_SERVICE_ALERT_ID; e.result = SituationExchangeResults.ADDED; deliveryResult.setPtSituationElement(ptSituationElements); deliveryResults.add(deliveryResult); Map<String, ServiceAlertBean> currentServiceAlerts = new HashMap<String, ServiceAlertBean>(); ServiceAlertBean testBean = ServiceAlertsTestSupport.createServiceAlertBean(TEST_SERVICE_ALERT_ID); currentServiceAlerts.put(TEST_SERVICE_ALERT_ID, testBean); List<String> deletedIds = new ArrayList<String>(); deletedIds.add("MTA NYCT_1000"); deletedIds.add("MTA NYCT_1001"); String environment = "test"; send(currentServiceAlerts, deletedIds, environment); ArgumentCaptor<String> argument = ArgumentCaptor.forClass(String.class); verify(webResourceWrapper).post(argument.capture(), same(TEST_ADDRESS)); String value = argument.getValue(); System.out.println(value); Diff diff = new Diff(EXPECTED_XML, value); diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier()); assertXMLEqual(diff, true); }