// sign PDF (will fail due to nonce and timestamp differing)
try
{
String inPath = inDir + "sign_me_tsa.pdf";
String outPath = outDir + "signed_tsa.pdf";
CreateSignature signing = new CreateSignature(keystore, password.toCharArray());
signing.signDetached(new File(inPath), new File(outPath), tsaClient);
}
catch (IOException e)
{
assertTrue(e.getCause() instanceof TSPValidationException);
}