// leaving this list empty
List<String> acoh2ContentList = new ArrayList<String>();
acoh2ContentList.add(acoh2);
acoh2ContentList.add(acoh3);
SOAPHeadersAdapter adapter = (SOAPHeadersAdapter)messageContext.getProperty(Constants.JAXWS_OUTBOUND_SOAP_HEADERS);
adapter.put(ACOH1_HEADER_QNAME, acoh1ContentList);
adapter.put(ACOH2_HEADER_QNAME, acoh2ContentList);
// remove everything, by different means
adapter.remove(ACOH1_HEADER_QNAME);
// SOAPHeadersAdapter does NOT give back a live list, so these don't mean anything
adapter.get(ACOH2_HEADER_QNAME).remove(0);
adapter.get(ACOH2_HEADER_QNAME).remove(acoh3);
assertTrue("Adapter should have one item, but has " + adapter.size(), adapter.size() == 1);
// double-check
assertTrue(adapter.get(ACOH2_HEADER_QNAME).get(0).equals(acoh2));
assertTrue(adapter.get(ACOH2_HEADER_QNAME).get(1).equals(acoh3));
assertTrue(((List<String>)(adapter.get(ACOH2_HEADER_QNAME))).size() == 2);
}