@@ -0,0 +1,1099 @@
+package org.commonjava.indy.folo.data;%0A%0Aimport org.commonjava.indy.folo.model.TrackedContent;%0Aimport org.commonjava.indy.model.core.io.IndyObjectMapper;%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.util.HashSet;%0Aimport java.util.Set;%0A%0Aimport static org.commonjava.indy.folo.FoloUtils.zipTrackedContent;%0A%0A/**%0A * This generates a zip file by a record json file. The zip file can be used to update the broken record, e.g., via%0A * curl -X PUT http://%3Chostname%3E/api/folo/admin/report/import --data-binary @build-15535.zip%0A */%0Apublic class FoloRecordZipTest%0A%7B%0A    String inputFile = %22/tmp/build-15535.json%22; // example%0A%0A    @Ignore%0A    @Test%0A    public void zipTrackedContentTest() throws IOException%0A    %7B%0A        IndyObjectMapper mapper = new IndyObjectMapper( true );%0A        TrackedContent in = mapper.readValue( new File( inputFile ), TrackedContent.class );%0A        Set%3CTrackedContent%3E sealed = new HashSet%3C%3E();%0A        sealed.add( in );%0A        zipTrackedContent( new File( inputFile.replace( %22.json%22, %22.zip%22 ) ), sealed );%0A    %7D%0A%0A%7D%0A

Add FoloRecordZipTest for repair broken records (#1238)