@Test
public void testDecodeQualification() {

    SpotVgtProductReaderPlugIn plugIn = new SpotVgtProductReaderPlugIn();
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(null));
    File dir = TestDataDir.get();
    File file;
    file = new File(dir, "decode_qual_intended.zip");
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_intended");
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_intended/PHYS_VOL.TXT");
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_1");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_1/PHYS_VOL.TXT");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_2");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_2/PHYS_VOL.TXT");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_3");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_3/TEST.TXT");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_3/NON_EXISTENT");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    // new for VGT 1P Collection3 products:
    file = new File(dir, "decode_qual_intended_collection3/zip/V220050513179.zip");
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_intended_collection3/V220050513179");
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.INTENDED, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_1_missing_bands_collection3/V220050513179");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
    file = new File(dir, "decode_qual_unable_2_missing_logdescr_collection3/V220050513179");
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file));
    assertEquals(DecodeQualification.UNABLE, plugIn.getDecodeQualification(file.getPath()));
}