### Question:
BaseDaoESImp implements BaseDao { public static String genericScriptReader(Path path) { String fileContents = ""; try { List<String> file = java.nio.file.Files.readAllLines(path, Charsets.UTF_8); for (String s : file) { fileContents += s.trim(); } } catch (IOException e) { LOGGER.error(e.getMessage()); } return fileContents; } BaseDaoESImp();  BaseDaoESImp(Properties properties); static String getResourceAbsolutePath(String resourcePath); static String genericScriptReader(Path path); void setESClient(ESClient esclient); @Override BoolQueryBuilder createQueryForMultiValue(TargetingChannel targetingChannel); @Override BoolQueryBuilder createQueryForMultiValuePlusAgeGender(TargetingChannel targetingChannel); @Override BoolQueryBuilder createQueryForAgeGender(TargetingChannel targetingChannel); @Override Map<Double, BoolQueryBuilder> createQueryForSingleValuesWithRegionRatio(TargetingChannel targetingChannel); @Override BoolQueryBuilder createQueryForSingleValues(TargetingChannel targetingChannel); @Override BoolQueryBuilder createOrQueryForSingleValue(List<TargetingChannel> tcs); @Override BoolQueryBuilder createInvQueryForSingleValue(TargetingChannel targetingChannel); @Override BoolQueryBuilder createInvQuery(BoolQueryBuilder boolQueryBuilder); @Override BoolQueryBuilder createAndQueryForSingleValue(List<TargetingChannel> tcs); @Override BoolQueryBuilder createAndQueryForMultiValuePlusAgeGender(List<TargetingChannel> tcs); @Override BoolQueryBuilder createAndQueryForAgeGender(List<TargetingChannel> tcs); static final String ES_TYPE; static final String ES_PREDICTION_DOC_PREFIX; static final String ES_TBR_DOC_PREFIX; static final String ES_CHART_DOC_PREFIX; }### Answer:
@Test public void genericScriptReader() throws URISyntaxException { String absPath = BaseDaoESImp.getResourceAbsolutePath("es/TbrKeysTotal.txt"); String res = BaseDaoESImp.genericScriptReader(Paths.get(absPath)); String exp = "int totals=0;for(int entry : params._source.data.days.values()){totals+=entry;}return totals;"; assertTrue(res.equals(exp)); }