@Test public void testGetReferenced() { message.addMessageHeader("key1", "value1"); message.addMessageHeader("key2", "value2"); message.addMessageHeader("key3", "value3"); assertEquals("value1", MetadataResolver.resolveKey(message, "$$key1")); assertEquals("value2", MetadataResolver.resolveKey(message, "$$key2")); assertEquals("value3", MetadataResolver.resolveKey(message, "$$key3")); }
public static String resolveKey(AdaptrisMessage message, String key) { if(key == null) return null; if(key.startsWith(REFERENCE_PREFIX)) { return message.getMetadataValue(key.substring(REFERENCE_PREFIX.length())); } else return key; }
MetadataResolver { public static String resolveKey(AdaptrisMessage message, String key) { if(key == null) return null; if(key.startsWith(REFERENCE_PREFIX)) { return message.getMetadataValue(key.substring(REFERENCE_PREFIX.length())); } else return key; } }
MetadataResolver { public static String resolveKey(AdaptrisMessage message, String key) { if(key == null) return null; if(key.startsWith(REFERENCE_PREFIX)) { return message.getMetadataValue(key.substring(REFERENCE_PREFIX.length())); } else return key; }  }
MetadataResolver { public static String resolveKey(AdaptrisMessage message, String key) { if(key == null) return null; if(key.startsWith(REFERENCE_PREFIX)) { return message.getMetadataValue(key.substring(REFERENCE_PREFIX.length())); } else return key; }  static String resolveKey(AdaptrisMessage message, String key); }
MetadataResolver { public static String resolveKey(AdaptrisMessage message, String key) { if(key == null) return null; if(key.startsWith(REFERENCE_PREFIX)) { return message.getMetadataValue(key.substring(REFERENCE_PREFIX.length())); } else return key; }  static String resolveKey(AdaptrisMessage message, String key);  }