@Test public void testDoService_NoOverwrite() throws CoreException { AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(); service.setOverwrite(false); msg.addMetadata("key1", getName()); execute(service, msg); assertNotSame("val1", msg.getMetadataValue("key1")); assertEquals(getName(), msg.getMetadataValue("key1")); assertEquals("val2", msg.getMetadataValue("key2")); assertTrue(msg.getMetadataValue("key3") == null); }
public void setOverwrite(Boolean b) { overwrite = b; }
AddMetadataService extends MetadataServiceImpl { public void setOverwrite(Boolean b) { overwrite = b; } }
AddMetadataService extends MetadataServiceImpl { public void setOverwrite(Boolean b) { overwrite = b; } AddMetadataService();  AddMetadataService(Collection<MetadataElement> elements);  AddMetadataService(MetadataElement... elements); }
AddMetadataService extends MetadataServiceImpl { public void setOverwrite(Boolean b) { overwrite = b; } 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 setOverwrite(Boolean b) { overwrite = b; } 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);  }