}
private void _testGetWFInfos() throws StoreException {
Map<String, List<String>> filter = new HashMap<String, List<String>>();
store.beginTrx();
WorkflowsInfo wfInfo = store.getWorkflowsInfo(filter, 1, 1);
System.out.println("got WorkflowsInfo " + wfInfo.getLen());
List<WorkflowJobBean> wfBeans = wfInfo.getWorkflows();
store.commitTrx();
assertEquals(1, wfBeans.size());
filter = new HashMap<String, List<String>>();
wfInfo = store.getWorkflowsInfo(filter, 1, 2);
wfBeans = wfInfo.getWorkflows();
assertEquals(2, wfBeans.size());
filter = new HashMap<String, List<String>>();
filter.put("user", Arrays.asList("testUser1"));
wfInfo = store.getWorkflowsInfo(filter, 1, 2);
wfBeans = wfInfo.getWorkflows();
assertEquals(1, wfBeans.size());
filter = new HashMap<String, List<String>>();
filter.put("user", Arrays.asList("testUser1", "testUser2"));
wfInfo = store.getWorkflowsInfo(filter, 1, 2);
wfBeans = wfInfo.getWorkflows();
assertEquals(2, wfBeans.size());
filter = new HashMap<String, List<String>>();
filter.put("user", Arrays.asList("testUser1"));
filter.put("status", Arrays.asList("succeeded"));
wfInfo = store.getWorkflowsInfo(filter, 1, 2);
wfBeans = wfInfo.getWorkflows();
assertEquals(1, wfBeans.size());
filter = new HashMap<String, List<String>>();
filter.put("user", Arrays.asList("testUser1", "testUser2"));
filter.put("name", Arrays.asList("testApp"));
wfInfo = store.getWorkflowsInfo(filter, 1, 2);
wfBeans = wfInfo.getWorkflows();
assertEquals(2, wfBeans.size());
assertEquals(2, wfInfo.getTotal());
assertEquals(1, wfInfo.getStart());
assertEquals(2, wfInfo.getLen());
filter = new HashMap<String, List<String>>();
filter.put("user", Arrays.asList("testUser1", "testUser2"));
filter.put("name", Arrays.asList("testApp"));
wfInfo = store.getWorkflowsInfo(filter, 1, 1);
wfBeans = wfInfo.getWorkflows();
assertEquals(1, wfBeans.size());
assertEquals(2, wfInfo.getTotal());
assertEquals(1, wfInfo.getStart());
assertEquals(1, wfInfo.getLen());
}