private void testLanguage(LanguageIdentifier lang, String language)
     throws IOException, PipelineException {
   final Document doc = new Document();
   doc.setFieldValue(lang.getInputField(), getResourceAsString(language));
   assertEquals(PipelineStepStatus.DEFAULT, lang.execute(doc));
   assertEquals(language, doc.getFieldValue(lang.getLangField()));
 }
 @Override
 public PipelineStepStatus execute(Document doc) throws PipelineException {
   messageDigest.reset();
   executeInputFields(doc);
   doc.setFieldValue(outField, toHexString(messageDigest.digest()));
   return PipelineStepStatus.DEFAULT;
 }