FileReaderImpl implements FileReader { @Override public String readFile(String filename) throws IOException { InputStream is = getClass().getClassLoader().getResourceAsStream( filename); return readInputStreamAsString(is); }  @Override String readFile(String filename); @Override String readInputStreamAsString(InputStream inputStream);  }
@Test public void testReadFile() throws IOException { String ruleExecutionResponseContainer = fileReader .readFile("ruleExecutionResponseContainer.xml"); logger.debug(ruleExecutionResponseContainer); assertTrue(ruleExecutionResponseContainer .contains("<ruleExecutionContainer>")); assertTrue(ruleExecutionResponseContainer .contains("<executionResponseList>")); assertTrue(ruleExecutionResponseContainer .contains("<executionResponse>")); assertTrue(ruleExecutionResponseContainer .contains("<c32SectionLoincCode>11450-4</c32SectionLoincCode>")); assertTrue(ruleExecutionResponseContainer .contains("<sensitivity>ETH</sensitivity>")); assertTrue(ruleExecutionResponseContainer .contains("<sensitivity>HIV</sensitivity>")); }