ExceptionDestination implements MessageDrivenDestination { public void setDefaultDestination(String s) { defaultDestination = Args.notBlank(s, "defaultDestination"); } 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 testSetDefaultDestination() { ExceptionDestination d = new ExceptionDestination(); d.setDefaultDestination(DEFAULT_DEST); assertEquals(DEFAULT_DEST, d.getDefaultDestination()); try { d.setDefaultDestination(""); fail("'' destination"); } catch (IllegalArgumentException expected) { } try { d.setDefaultDestination(null); fail("null destination"); } catch (IllegalArgumentException expected) { } assertEquals(DEFAULT_DEST, d.getDefaultDestination()); }