@@ -0,0 +1,1329 @@
+/*%0A * Copyright 2015 Datalogics, Inc.%0A */%0A%0Apackage com.datalogics.pdf.samples.manipulation;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport com.adobe.pdfjt.pdf.document.PDFDocument;%0A%0Aimport com.datalogics.pdf.samples.SampleTest;%0A%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.nio.file.Files;%0A%0A/**%0A * Tests the FlattenPdf sample.%0A */%0Apublic class FlattenPdfTest extends SampleTest %7B%0A%0A    private static final String OUTPUT_FLATTENED_PDF_PATH = %22Flattened.pdf%22;%0A    private static final String INPUT_FORM_PDF_PATH = %22Acroform.pdf%22;%0A%0A    @Test%0A    public void testFlattenForm() throws Exception %7B%0A        final File file = newOutputFile(OUTPUT_FLATTENED_PDF_PATH);%0A        if (file.exists()) %7B%0A            Files.delete(file.toPath());%0A        %7D%0A%0A        FlattenPdf.main(INPUT_FORM_PDF_PATH, file.getCanonicalPath());%0A        assertTrue(file.getPath() + %22 must exist after run%22, file.exists());%0A%0A        final PDFDocument document = openPdfDocument(file.getCanonicalPath());%0A%0A        assertEquals(%22There should not be an Acroform dictionary in a flattened form document%22,%0A                     document.getInteractiveForm(), null);%0A    %7D%0A%0A    @Test%0A    public void testFlattenAnnotations() throws Exception %7B%0A%0A    %7D%0A%0A    @Test%0A    public void testFlattenLayers() %7B%0A%0A    %7D%0A%7D%0A

Add test file for flattening sample