HashStage extends AbstractMappingProcessStage { public void setAlgorithm(String algorithm) { this.algorithm = algorithm; }  @Override void stageInit(); @Override void processField(LocalDocument doc, String fromField, String toField); void setAlgorithm(String algorithm); void setHasher(Hasher hasher);  }
@Test public void testSha256() throws Exception { HashStage hs = new HashStage(); hs.setAlgorithm("SHA-256"); Map<String, String> map = new HashMap<String, String>(); map.put("from", "to"); hs.setMap(map); hs.init(); testStringSha256(hs, RandomStringUtils.randomAscii(10000)); testStringSha256(hs, RandomStringUtils.randomAlphanumeric(10000)); for(int i=0;i<1000; i++) { testStringSha256(hs, RandomStringUtils.random(100)); } }