public void verify(ZipInputStream zis, byte[] buf) throws IOException { OutputStream os = new FileOutputStream("/tmp/meta.json"); int n; while ((n = zis.read(buf, 0, 1024)) > -1) { os.write(buf, 0, n); } os.flush(); os.close(); ObjectMapper om = SyncUtils.getObjectMapper(new Config(new HashMap<String, String>())); Meta m = om.readValue(new FileInputStream("/tmp/meta.json"), Meta.class); assertNotNull(m); assertEquals("${version}-${release}", m.getVersion()); assertTrue(start.before(m.getCreated())); }