FormattedMetadataDestination implements MessageDrivenDestination { @Override public String getDestination(AdaptrisMessage msg) throws CoreException { String destinationName = defaultIfEmpty(String.format(getDestinationTemplate(), createParams(msg)), null); log.debug("Dynamic destination [" + destinationName + "]"); return destinationName; } FormattedMetadataDestination(); void addMetadataKey(String s); List<String> getMetadataKeys(); ElementFormatter getElementFormatter(); void setElementFormatter(ElementFormatter elementFormatter); void setMetadataKeys(List<String> l); void addObjectMetadataKey(String s); List<String> getObjectMetadataKeys(); void setObjectMetadataKeys(List<String> l); @Override String getDestination(AdaptrisMessage msg); String getDestinationTemplate(); void setDestinationTemplate(String s);  }
@Test public void testGetDestination_NoConfig() throws CoreException { FormattedMetadataDestination dest = new FormattedMetadataDestination(); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("payload"); assertNull(dest.getDestination(msg)); }