JdbcMapInsert extends JdbcService { public <T extends JdbcMapInsert> T withRowsAffectedMetadataKey(String s) { setRowsAffectedMetadataKey(s); return (T) this; } JdbcMapInsert(); String getTable(); void setTable(String s); T withTable(String s); KeyValuePairSet getFieldMappings(); void setFieldMappings(KeyValuePairSet mappings); T withMappings(KeyValuePairSet s); Character getColumnBookendCharacter(); void setColumnBookendCharacter(Character c); T withColumnBookend(Character c); String getRowsAffectedMetadataKey(); void setRowsAffectedMetadataKey(String key); T withRowsAffectedMetadataKey(String s);  }
@Test public void testService() throws Exception { createDatabase(); InsertProperties service = configureForTests(createService()).withRowsAffectedMetadataKey("rowsInserted"); AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage(CONTENT); ExampleServiceCase.execute(service, msg); doAssert(1); assertTrue(msg.headersContainsKey("rowsInserted")); assertEquals("1", msg.getMetadataValue("rowsInserted")); }