String error = (String) map.get(ModelView.ERROR);
if ("true".equalsIgnoreCase(error)) {
if (expiredTime) {
throw new AssertionFailedError("Add the location " + location +
" takes more than " + (waittime / 60) +
" and search the query " + query + " failed. Status:" +
(String) map.get(ModelView.STATUS));
} else {
throw new AssertionFailedError("Add the location " + location +
" and search the query " + query + " in " +
((System.currentTimeMillis() - starttime) / 1000) +
" seconds failed. Status:" +
(String) map.get(ModelView.STATUS));
}