@Test
public void parseInvalidTruncatedGzipFile() throws Exception {

    File gzipFile = new File("src/test/resources/gzip/invalid-truncated.gz");
    assertTrue( gzipFile.isFile() );
    
    GzipModule gzm = new GzipModule();
    RepInfo info = new RepInfo(gzipFile.getAbsolutePath());
    gzm.parse(new FileInputStream(gzipFile), info, 0);
    
    assertEquals(RepInfo.FALSE, info.getWellFormed());
    assertEquals(RepInfo.FALSE, info.getValid());
    assertTrue(info.getSigMatch().isEmpty());
    // Validate the failures.
    assertEquals(1, info.getMessage().size());
    Map<String, Integer> messages = extractMessages(info.getMessage());
    for(Map.Entry<String, Integer> e : messages.entrySet()) {
        System.out.println(e.getKey() + " : " + e.getValue());
    }
    assertEquals(1, messages.size());
    Iterator<String> messageKeyIterator = messages.keySet().iterator();
    String errorMessage = messageKeyIterator.next();
    assertNotNull(errorMessage);
      assertTrue("java.util.zip.DataFormatException");
    assertTrue(errorMessage + " should contain " + DataFormatException.class.toString(), errorMessage.contains(DataFormatException.class.getCanonicalName()));
    assertFalse(messageKeyIterator.hasNext());
}