@Test public void testBug2101_SameSourceKeyMultipleDestinationKeys() throws Exception { CopyMetadataService service = createService(); service.getMetadataKeys().add(new KeyValuePair(KEY_TO_BE_COPIED, NEW_KEY_2)); service.getMetadataKeys().add(new KeyValuePair(KEY_TO_BE_COPIED, NEW_KEY_3)); service.getMetadataKeys().add(new KeyValuePair(KEY_TO_BE_COPIED, NEW_KEY_4)); AdaptrisMessage msg = createMessage(); execute(service, msg); assertTrue(msg.getMetadataValue(KEY_TO_BE_COPIED).equals(METADATA_VALUE)); assertTrue(NEW_KEY_1 + " must exist as metadata", msg.containsKey(NEW_KEY_1)); assertTrue(NEW_KEY_2 + " must exist as metadata", msg.containsKey(NEW_KEY_2)); assertTrue(NEW_KEY_3 + " must exist as metadata", msg.containsKey(NEW_KEY_3)); assertTrue(NEW_KEY_4 + " must exist as metadata", msg.containsKey(NEW_KEY_4)); assertEquals(METADATA_VALUE, msg.getMetadataValue(NEW_KEY_1)); assertEquals(METADATA_VALUE, msg.getMetadataValue(NEW_KEY_2)); assertEquals(METADATA_VALUE, msg.getMetadataValue(NEW_KEY_3)); assertEquals(METADATA_VALUE, msg.getMetadataValue(NEW_KEY_4)); }
public KeyValuePairCollection getMetadataKeys() { return metadataKeys; }
CopyMetadataService extends MetadataServiceImpl { public KeyValuePairCollection getMetadataKeys() { return metadataKeys; } }
CopyMetadataService extends MetadataServiceImpl { public KeyValuePairCollection getMetadataKeys() { return metadataKeys; } CopyMetadataService(); }
CopyMetadataService extends MetadataServiceImpl { public KeyValuePairCollection getMetadataKeys() { return metadataKeys; } CopyMetadataService(); @Override void doService(AdaptrisMessage msg); KeyValuePairCollection getMetadataKeys(); void setMetadataKeys(KeyValuePairCollection m); }
CopyMetadataService extends MetadataServiceImpl { public KeyValuePairCollection getMetadataKeys() { return metadataKeys; } CopyMetadataService(); @Override void doService(AdaptrisMessage msg); KeyValuePairCollection getMetadataKeys(); void setMetadataKeys(KeyValuePairCollection m);  }