QueryServiceUtil { public static <T> T findEqItem(QueryService<T, ?> s, QueryAttr qAttr, Object value) { return findItem(s, new QueryExprCompare(qAttr, CompOpEquals.class, value)); } private  QueryServiceUtil(); static T getItem(QueryService<T, ?> s, QueryExpr itemExpr); static T findItem(QueryService<T, ?> s, QueryExpr itemExpr); @SuppressWarnings("unchecked") static List<T> findItems(QueryService<T, ?> s, QueryExpr itemExpr, int maxNumOfItems); static T findEqItem(QueryService<T, ?> s, QueryAttr qAttr, Object value);  }
@Test public void testFindEqItemOnIdQueryService() { assertEquals("2", QueryServiceUtil.findEqItem(idQueryService, TestBean.ATTR_NAME, "2").toString()); }
@Test public void testFindEqItemOnPageQueryService() { assertEquals("2", QueryServiceUtil.findEqItem(pageQueryService, TestBean.ATTR_NAME, "2").toString()); }