(File file)
| 129 | } |
| 130 | |
| 131 | private void writeTestFile(File file) throws IOException { |
| 132 | File parent = file.getParentFile(); |
| 133 | if (!parent.exists()) { |
| 134 | assertThat(parent.mkdirs()).isTrue(); |
| 135 | } |
| 136 | byte[] byteArray = new byte[16384]; |
| 137 | new Random().nextBytes(byteArray); |
| 138 | try (OutputStream out = new FileOutputStream(file)) { |
| 139 | out.write(byteArray); |
| 140 | } |
| 141 | file.deleteOnExit(); |
| 142 | } |
| 143 | } |
no test coverage detected