@Test public void testService_WithByteTranslator() throws Exception { PayloadHashingService service = new PayloadHashingService(SHA256, METADATA_KEY); service.setByteTranslator(new HexStringByteTranslator()); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(PAYLOAD); execute(service, msg); assertTrue(msg.containsKey(METADATA_KEY)); assertEquals(PAYLOAD, msg.getContent()); assertNotNull(msg.getMetadataValue(METADATA_KEY)); assertEquals(createHash(new HexStringByteTranslator()), msg.getMetadataValue(METADATA_KEY)); }
public void setByteTranslator(ByteTranslator t) { this.byteTranslator = t; }
PayloadHashingService extends ServiceImp { public void setByteTranslator(ByteTranslator t) { this.byteTranslator = t; } }
PayloadHashingService extends ServiceImp { public void setByteTranslator(ByteTranslator t) { this.byteTranslator = t; } PayloadHashingService();  PayloadHashingService(String hash, String metadataKey); }
PayloadHashingService extends ServiceImp { public void setByteTranslator(ByteTranslator t) { this.byteTranslator = t; } PayloadHashingService();  PayloadHashingService(String hash, String metadataKey); @Override void doService(AdaptrisMessage msg); String getHashAlgorithm(); void setHashAlgorithm(String hashAlgorithm); String getMetadataKey(); void setMetadataKey(String metadataKey); @Override void prepare(); ByteTranslator getByteTranslator(); void setByteTranslator(ByteTranslator t); }
PayloadHashingService extends ServiceImp { public void setByteTranslator(ByteTranslator t) { this.byteTranslator = t; } PayloadHashingService();  PayloadHashingService(String hash, String metadataKey); @Override void doService(AdaptrisMessage msg); String getHashAlgorithm(); void setHashAlgorithm(String hashAlgorithm); String getMetadataKey(); void setMetadataKey(String metadataKey); @Override void prepare(); ByteTranslator getByteTranslator(); void setByteTranslator(ByteTranslator t);  }