FileBackedMessageFactory extends DefaultMessageFactory { public void setTempDirectory(String tempDirectory) { this.tempDirectory = tempDirectory; } FileBackedMessageFactory(); String getTempDirectory(); Integer getDefaultBufferSize(); void setDefaultBufferSize(Integer bufsiz); Long getMaxMemorySizeBytes(); void setMaxMemorySizeBytes(Long l); void setTempDirectory(String tempDirectory); @Override AdaptrisMessage newMessage(); File createTempFile(Object marker); Boolean getCreateTempDir(); void setCreateTempDir(Boolean b); Boolean getExtendedLogging(); void setExtendedLogging(Boolean b); Boolean getUseNio(); void setUseNio(Boolean useNio);  }
@Test public void testSetTempDirectory() throws Exception { FileBackedMessageFactory factory = getMessageFactory(); String tmpDir = tempDir(); assertNull(factory.getTempDirectory()); assertNotNull(factory.tempDirectory()); assertEquals(new File(System.getProperty("java.io.tmpdir")), factory.tempDirectory()); factory.setTempDirectory(tmpDir); assertEquals(tmpDir, factory.getTempDirectory()); assertEquals(tmpDir, factory.tempDirectory().getCanonicalPath()); }