storage.putHeadCacheInfo(info);
} finally {
storage.close();
}
ImportBean bean = createBean();
Map<String, ImportTargetTableBean> map = new HashMap<String, ImportTargetTableBean>();
ImportTargetTableBean table1 = new ImportTargetTableBean();
table1.setDfsFilePath("nothing1");
table1.setCacheId("nothing1");
map.put("nothing1", table1);
bean.setTargetTable(map);
ImportTargetTableBean table2 = new ImportTargetTableBean();
table2.setDfsFilePath("available");
table2.setCacheId("available");
map.put("available", table2);
bean.setTargetTable(map);
ImportTargetTableBean table3 = new ImportTargetTableBean();
table3.setDfsFilePath("nothing3");
table3.setCacheId("nothing3");
map.put("nothing3", table3);
bean.setTargetTable(map);
ImportTargetTableBean table4 = new ImportTargetTableBean();
table4.setDfsFilePath("nocache");
map.put("nocache", table4);
bean.setTargetTable(map);
GetCacheInfoLocal service = new Mock();
Map<String, CacheInfo> results = service.get(bean);
assertThat(results.size(), is(1));
assertThat(results.get("available"), is(info));