PropertyReplacementFilter extends StreamReaderDelegate { private String getProperty(String[] keys, String defaultValue) { for (String key: keys) { String value = this.properties.getProperty(key.trim()); if (value != null) return value; } return defaultValue; } PropertyReplacementFilter(XMLStreamReader reader);  PropertyReplacementFilter(XMLStreamReader reader, Properties properties); @Override String getAttributeValue(int index); @Override String getAttributeValue(String namespaceUri, String localName); @Override String getElementText(); @Override String getText(); @Override char[] getTextCharacters(); @Override int getTextCharacters(int sourceStart, char[] target, int targetStart, int length);  }
@Test public void getProperty() { String property = "property"; Object expected = new Object(); when(this.reader.getProperty(property)).thenReturn(expected); Object result = this.filter.getProperty(property); assertSame(expected, result); }