@Test
public void badInputUnzipFileFile() throws Exception {

  File destFile = new File(destDir, "badInputFileFile");
  try {
    // Null input file, correct destination file
    try {
      ZipUtil.unzip((File) null, destFile);
      logger.error("Unzip should fail when input File is null");
      Assert.fail("Unzip should fail when input File is null");
    } catch (IllegalArgumentException e) {
      logger.debug("Detecting null input File (File, File): OK");
    }
    // Non-existing input file, correct destination file
    try {
      ZipUtil.unzip(dummieFile, destFile);
      logger.error("Unzip should fail when input File doesn't exist");
      Assert.fail("Unzip should fail when input File doesn't exist");
    } catch (FileNotFoundException e) {
      logger.debug("Detecting non-existing input File (File, File): OK");
    }
    // Correct input filename, null destination filename
    try {
      ZipUtil.unzip(sampleZip, (File) null);
      logger.error("Unzip should fail when destination File is null");
      Assert.fail("Unzip should fail when destination File is null");
    } catch (IllegalArgumentException e) {
      logger.debug("Detecting null destination File (File, File): OK");
    }
    // Invalid input file (using a regular file as input), correct destination file
    try {
      ZipUtil.unzip(srcFile, destFile);
      logger.error("Unzip should fail when the input File does not represent a zip file");
      Assert.fail("Unzip should fail when the input File does not represent a zip file");
    } catch (IllegalArgumentException e) {
      logger.debug("Detecting input File not representing a valid zip file (File, File): OK");
    }
    // Correct input file, invalid destination file (some existing regular file rather than a dir)
    try {
      ZipUtil.unzip(sampleZip, srcFile);
      logger.error("Unzip should fail when the destination File does not represent a directory");
      Assert.fail("Unzip should fail when the destination File does not represent a directory");
    } catch (IllegalArgumentException e) {
      logger.debug("Detecting destination File not representing a directory (File, File): OK");
    }
  } catch (Exception e) {
    logger.error("Another exception was expected, but got {} instead: {}", e.getClass().getName(), e.getMessage());
    Assert.fail("Another exception was expected, but got " + e.getClass().getName() + "instead: " + e.getMessage());
  }
}