AppController extends Controller implements AMParams { public void tasks() { try { requireJob(); } catch (Exception e) { renderText(e.getMessage()); return; } if (app.getJob() != null) { try { String tt = $(TASK_TYPE); tt = tt.isEmpty() ? "All" : StringUtils.capitalize( org.apache.hadoop.util.StringUtils.toLowerCase( MRApps.taskType(tt).toString())); setTitle(join(tt, " Tasks for ", $(JOB_ID))); } catch (Exception e) { LOG.error("Failed to render tasks page with task type : " + $(TASK_TYPE) + " for job id : " + $(JOB_ID), e); badRequest(e.getMessage()); } } render(tasksPage()); } protected  AppController(App app, Configuration conf, RequestContext ctx,
      String title); @Inject protected  AppController(App app, Configuration conf, RequestContext ctx); @Override void index(); void info(); void job(); void jobCounters(); void taskCounters(); void singleJobCounter(); void singleTaskCounter(); void tasks(); void task(); void attempts(); void conf(); void downloadConf(); void requireJob(); void requireTask();  }
@Test public void testTasks() { appController.tasks(); assertEquals(TasksPage.class, appController.getClazz()); }