XmlPayloadTranslator extends XmlPayloadTranslatorImpl { public void setPreserveOriginalMessage(Boolean b) { preserveOriginalMessage = b; } XmlPayloadTranslator(); @Override long translateResult(JdbcResult source, AdaptrisMessage target); Boolean getPreserveOriginalMessage(); void setPreserveOriginalMessage(Boolean b);  }
@Test public void testPreserveOriginal() throws Exception { createDatabase(); List<AdapterTypeVersion> dbItems = generate(10); AdapterTypeVersion entry = dbItems.get(0); populateDatabase(dbItems, false); JdbcDataQueryService s = createMetadataService(); XmlPayloadTranslator t = new XmlPayloadTranslator(); t.setPreserveOriginalMessage(true); s.setResultSetTranslator(t); AdaptrisMessage msg = createMessage(entry); execute(s, msg); assertTrue(ADAPTER_ID_KEY + " exists", msg.containsKey(ADAPTER_ID_KEY)); XmlUtils xu = XmlHelper.createXmlUtils(msg); assertNotNull("Xpath /Results/OriginalMessage", xu.getSingleNode("/Results/OriginalMessage")); assertNotNull("/Results/Row", xu.getSingleNode("/Results/Row")); }