AppController extends Controller implements AMParams { public void task() { try { requireTask(); } catch (Exception e) { renderText(e.getMessage()); return; } if (app.getTask() != null) { setTitle(join("Attempts for ", $(TASK_ID))); } render(taskPage()); } 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 testTask() { appController.task(); assertEquals("Attempts for " + taskId , appController.getProperty().get("title")); assertEquals(TaskPage.class, appController.getClazz()); }