ExceptionDestination implements MessageDrivenDestination { public void setExceptionMapping(KeyValuePairCollection mapping) { exceptionMapping = Args.notNull(mapping, "exceptionMappings"); } ExceptionDestination();  ExceptionDestination(String defaultDestination, KeyValuePairCollection mappings); @Override String getDestination(AdaptrisMessage msg); KeyValuePairCollection getExceptionMapping(); void setExceptionMapping(KeyValuePairCollection mapping); String getDefaultDestination(); void setDefaultDestination(String s);  }
@Test public void testSetExceptionMapping() { ExceptionDestination d = new ExceptionDestination(); KeyValuePairCollection col = createExceptionMappings(); d.setExceptionMapping(col); assertTrue(col == d.getExceptionMapping()); assertEquals(col, d.getExceptionMapping()); try { d.setExceptionMapping(null); fail("null Exception mapping"); } catch (IllegalArgumentException expected) { } assertEquals(col, d.getExceptionMapping()); }