### Question:
OFDDir extends VirtualContainer { public void jar(Path filePath) throws IOException { if (filePath == null) { throw new IllegalArgumentException("生成OFD文件路径（fileName）不能为空"); } if (Files.exists(filePath)) { Files.delete(filePath); } this.flush(); String fullOfFilePath = filePath.toAbsolutePath().toString(); this.zip(getSysAbsPath(), fullOfFilePath); } OFDDir(Path fullDir); static OFDDir newOFD(); OFD getOfd(); OFDDir setOfd(OFD ofd); DocDir newDoc(); DocDir obtainDoc(int index); DocDir getDocByIndex(int index); DocDir getDocDir(String name); DocDir obtainDocDefault(); void jar(Path filePath); static final String OFDFileName; }### Answer:
@Test void jar() throws IOException { final OFDDir ofdDir = build(); Path res = Paths.get("target/helloworld.ofd"); ofdDir.jar(res); ofdDir.clean(); Assertions.assertTrue(Files.notExists(p)); }