### Question:
JP2ProductWriter extends AbstractProductWriter { @Override public void close() throws IOException { } JP2ProductWriter(ProductWriterPlugIn writerPlugIn); @Override void writeBandRasterData(Band sourceBand, int sourceOffsetX, int sourceOffsetY, int sourceWidth, int sourceHeight, ProductData sourceBuffer, ProgressMonitor pm); @Override void flush(); @Override void close(); @Override void deleteOutput();  }### Answer:
@Test public void testWriteProductNodes_ChangeFileSize() throws IOException { File writtenFile = new File(testsFolderPath.toFile(), FILE_NAME); _productWriter.writeProductNodes(_product, writtenFile); assertTrue(writtenFile.length() == 0); writeBand(_product); _productWriter.close(); assertTrue(writtenFile.length() > 0); }