public void testEncryptedSignedPost() throws Exception
{
WebTarget target = client.target("http://localhost:9095/smime/encrypted/signed");
Customer cust = new Customer();
cust.setName("Bill");
SignedOutput signed = new SignedOutput(cust, "application/xml");
signed.setPrivateKey(privateKey);
signed.setCertificate(cert);
EnvelopedOutput output = new EnvelopedOutput(signed, "multipart/signed");
output.setCertificate(cert);
Response res = target.request().post(Entity.entity(output, "application/pkcs7-mime"));
Assert.assertEquals(204, res.getStatus());
res.close();