private void testMethod(TemplateHashModel h, int objIdx, int mIdx)
throws TemplateModelException, AssertionError {
TemplateMethodModel pv = (TemplateMethodModel) h.get("m" + mIdx);
final int expected = objIdx * 1000 + mIdx;
final int got = ((TemplateNumberModel) pv.exec(null)).getAsNumber().intValue();
if (got != expected) {
throw new AssertionError("Method assertation failed; " +
"expected " + expected + ", but got " + got);
}
}