List<CopyEntry> copyEntries = new ArrayList<CopyEntry>();
factory.setCopyEntries(copyEntries);
factory.setHdfsEntries(new ArrayList<LocalResourcesFactoryBean.TransferEntry>());
List<RawCopyEntry> rawEntries = new ArrayList<RawCopyEntry>();
rawEntries.add(new RawCopyEntry(new byte[10], "rawContent1", true));
factory.setRawCopyEntries(rawEntries);
factory.afterPropertiesSet();
SmartResourceLocalizer localizer = (SmartResourceLocalizer) factory.getObject();
localizer.setStagingDirectory(new Path(dir));