@Test
public void manipulatePdfTest() throws IOException, DocumentException {

    String fileName = "xmp_metadata_added.pdf";
    PdfReader reader = new PdfReader(CMP_FOLDER + "pdf_metadata.pdf");
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(OUT_FOLDER + fileName));
    HashMap<String, String> info = reader.getInfo();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    XmpWriter xmp = new XmpWriter(baos, info);
    xmp.close();
    stamper.setXmpMetadata(baos.toByteArray());
    stamper.close();
    reader.close();
    CompareTool ct = new CompareTool();
    Assert.assertNull(ct.compareXmp(OUT_FOLDER + fileName, CMP_FOLDER + fileName, true));
}