public void testPKCS7SignedTextOutput() throws Exception
{
ClientRequest request = new ClientRequest(TestPortProvider.generateURL("/smime/pkcs7-signature/text"));
String base64 = request.getTarget(String.class);
System.out.println(base64);
PKCS7SignatureInput signed = new PKCS7SignatureInput(base64);
signed.setProviders(request.getProviderFactory());
String output = (String) signed.getEntity(String.class, MediaType.TEXT_PLAIN_TYPE);
System.out.println(output);
Assert.assertEquals("hello world", output);
Assert.assertTrue(signed.verify(cert));
}