@Test(expected = ManifestException.class)
public void testGetDateField() throws PluginException, ManifestException {

    Manifest manifest = JarHelper.createManifest(new HashMap<String, String>() {
        {
            put(ManifestField.DATE.getFieldName(), "invalid-date");
        }
    });
    assertFalse(getDateField(manifest, ManifestField.NAME).isPresent()); //Missing field
    getDateField(manifest, ManifestField.DATE); //Throws exception
}