ReadMetadataFromFilesystem extends MetadataServiceImpl { public boolean overwriteExistingMetadata() { return BooleanUtils.toBooleanDefaultIfNull(getOverwriteExistingMetadata(), false); } ReadMetadataFromFilesystem();  ReadMetadataFromFilesystem(MessageDrivenDestination d); @Override void doService(AdaptrisMessage msg); InputStyle getInputStyle(); void setInputStyle(InputStyle style); MessageDrivenDestination getDestination(); void setDestination(MessageDrivenDestination d); Boolean getOverwriteExistingMetadata(); void setOverwriteExistingMetadata(Boolean b); boolean overwriteExistingMetadata(); FileNameCreator getFilenameCreator(); void setFilenameCreator(FileNameCreator creator);  }
@Test public void testOverwriteExistingMetadata() throws Exception { ReadMetadataFromFilesystem service = new ReadMetadataFromFilesystem(); assertNull(service.getOverwriteExistingMetadata()); assertFalse(service.overwriteExistingMetadata()); service.setOverwriteExistingMetadata(null); assertFalse(service.overwriteExistingMetadata()); service.setOverwriteExistingMetadata(Boolean.TRUE); assertNotNull(service.getOverwriteExistingMetadata()); assertTrue(service.overwriteExistingMetadata()); }