InputStream input = Pkcs7ParserTest.class.getResourceAsStream(
"/test-documents/testDetached.p7s");
try {
ContentHandler handler = new BodyContentHandler();
Metadata metadata = new Metadata();
new Pkcs7Parser().parse(input, handler, metadata, new ParseContext());
} catch (NullPointerException npe) {
fail("should not get NPE");
} catch (TikaException te) {
assertTrue(te.toString().indexOf("cannot parse detached pkcs7 signature") != -1);
} finally {