@Test public void testFilesizeMetadata() throws CoreException { AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance() .newMessage("The Quick Brown Fox Jumps Over The Lazy Dog"); MetadataElement m3 = new MetadataElement("key3", "$MSG_SIZE$"); service.addMetadataElement(m3); execute(service, msg); assertTrue(msg.getMetadataValue("key1").equals("val1")); assertTrue(msg.getMetadataValue("key2").equals("val2")); assertEquals(String.valueOf(msg.getSize()), msg.getMetadataValue("key3")); }
public void addMetadataElement(MetadataElement element) { metadataElements.add(element); }
AddMetadataService extends MetadataServiceImpl { public void addMetadataElement(MetadataElement element) { metadataElements.add(element); } }
AddMetadataService extends MetadataServiceImpl { public void addMetadataElement(MetadataElement element) { metadataElements.add(element); } AddMetadataService();  AddMetadataService(Collection<MetadataElement> elements);  AddMetadataService(MetadataElement... elements); }
AddMetadataService extends MetadataServiceImpl { public void addMetadataElement(MetadataElement element) { metadataElements.add(element); } AddMetadataService();  AddMetadataService(Collection<MetadataElement> elements);  AddMetadataService(MetadataElement... elements); @Override void doService(AdaptrisMessage msg); Set<MetadataElement> getMetadataElements(); void setMetadataElements(Set<MetadataElement> s); void addMetadataElement(MetadataElement element); void addMetadataElement(String key, String value); Boolean getOverwrite(); void setOverwrite(Boolean b); }
AddMetadataService extends MetadataServiceImpl { public void addMetadataElement(MetadataElement element) { metadataElements.add(element); } AddMetadataService();  AddMetadataService(Collection<MetadataElement> elements);  AddMetadataService(MetadataElement... elements); @Override void doService(AdaptrisMessage msg); Set<MetadataElement> getMetadataElements(); void setMetadataElements(Set<MetadataElement> s); void addMetadataElement(MetadataElement element); void addMetadataElement(String key, String value); Boolean getOverwrite(); void setOverwrite(Boolean b);  }