List<User> users = dao.find("from User u where loginName=?", DEFAULT_LOGIN_NAME);
assertEquals(1, users.size());
assertEquals(DEFAULT_LOGIN_NAME, users.get(0).getLoginName());
User user = dao.findUnique("from User u where loginName=?", DEFAULT_LOGIN_NAME);
assertEquals(DEFAULT_LOGIN_NAME, user.getLoginName());
Map<String, Object> values = Maps.newHashMap();
values.put("loginName", DEFAULT_LOGIN_NAME);
users = dao.find("from User u where loginName=:loginName", values);
assertEquals(1, users.size());
assertEquals(DEFAULT_LOGIN_NAME, users.get(0).getLoginName());
user = dao.findUnique("from User u where loginName=:loginName", values);
assertEquals(DEFAULT_LOGIN_NAME, user.getLoginName());
}