@Test
public void testGetPackageFromTruncatedFile() throws IOException {

    File packageFile = getTempFile("test-package-truncated.zip");
    try (RegisteredPackage regPack = new FSRegisteredPackage(newRegistry(packageFile), newInstallState(packageFile));
            VaultPackage vltPack = regPack.getPackage()) {
        assertNotNull(vltPack);
        assertNull(vltPack.getArchive());
    } catch (IOException e) {
        fail("should not throw any exception, but thrown: " + e.getMessage());
    } finally {
        packageFile.delete();
    }
}