### Question:
ChunkUtils { public static boolean validateChunkForOverwrite(File chunkFile, ChunkInfo info) { if (isOverWriteRequested(chunkFile, info)) { if (!isOverWritePermitted(info)) { LOG.warn("Duplicate write chunk request. Chunk overwrite " + "without explicit request. {}", info); } return true; } return false; } private  ChunkUtils(); static void writeData(File file, ChunkBuffer data,
      long offset, long len, VolumeIOStats volumeIOStats, boolean sync); static void writeData(FileChannel file, String filename,
      ChunkBuffer data, long offset, long len, VolumeIOStats volumeIOStats
  ); static void readData(File file, ByteBuffer buf,
      long offset, long len, VolumeIOStats volumeIOStats); static boolean validateChunkForOverwrite(File chunkFile,
      ChunkInfo info); static boolean isOverWriteRequested(File chunkFile, ChunkInfo
      chunkInfo); static boolean isOverWritePermitted(ChunkInfo chunkInfo); static void verifyChunkFileExists(File file); static void validateBufferSize(long expected, long actual); static final Set<? extends OpenOption> READ_OPTIONS; static final FileAttribute<?>[] NO_ATTRIBUTES; }### Answer:
@Test public void validateChunkForOverwrite() throws IOException { Path tempFile = Files.createTempFile(PREFIX, "overwrite"); FileUtils.write(tempFile.toFile(), "test", StandardCharsets.UTF_8); Assert.assertTrue( ChunkUtils.validateChunkForOverwrite(tempFile.toFile(), new ChunkInfo("chunk", 3, 5))); Assert.assertFalse( ChunkUtils.validateChunkForOverwrite(tempFile.toFile(), new ChunkInfo("chunk", 5, 5))); }