chartScriptRes.setName("testChartScript");
gstcu.insert(chartScriptRes);
// Resource fullChartScript = gstcu.getGeoStoreClient().getResource(chartScriptId);
SearchFilter chartDataFilter = new CategoryFilter(UNREDDCategories.CHARTDATA.getName(), SearchOperator.EQUAL_TO);
ShortResourceList res0 = gstcu.getGeoStoreClient().searchResources(chartDataFilter);
assertTrue(res0.isEmpty());
//---------------------
// ok, some real testing now
LOGGER.info("===== Run the code!");
FlowUtil flowUtil = new FlowUtil(getTempDir(), getConfigDir());
flowUtil.runStatsAndScripts(LAYERNAME, YEAR, MONTH, DAY, classFile, getGeoStoreUtil());
//---------------------
LOGGER.info("===== Testing results");
Resource loadedStatsData = gstcu.searchStatsData(STATSDEFNAME, YEAR, MONTH, DAY);
assertNotNull("Could not reload StatsData", loadedStatsData);
ShortResourceList res1 = gstcu.getGeoStoreClient().searchResources(chartDataFilter);
assertNotNull(res1);
assertNotNull(res1.getList());
assertEquals(1, res1.getList().size());
}