package be.cegeka.batchers.taxcalculator.application.domain.pdf;

import fr.opensagres.xdocreport.core.XDocReportException;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.junit.Test;
import org.springframework.core.io.FileSystemResource;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import static be.cegeka.batchers.taxcalculator.application.ApplicationAssertions.assertThat;


public class PDFGeneratorServiceTest {


    @Test
    public void given_aWordTemplate_whenConvertingToPdf_thenTheSamePdfIsGenerated() throws IOException, XDocReportException {
        PDFGeneratorService pdfGeneratorService = new PDFGeneratorService();

        Map<String, Object> context = new HashMap<>();
        context.put("test", "cegeka-batchers");

        byte[] actual = pdfGeneratorService.generatePdfAsByteArray(new FileSystemResource("src/test/resources/test_template.docx"), context);

        assertThat(PDDocument.load(new ByteArrayInputStream(actual)))
                .containsText("cegeka-batchers is working");
    }


}

@@ -220,26 +220,25 @@
 core.io.
-FileSystem
+ClassPath
 Resource
@@ -883,47 +883,27 @@
 new 
-FileSystemResource(%22src/test/resources/
+ClassPathResource(%22
 test

fix test