public void task() {
    try {
      requireTask();
    }
    catch (Exception e) {
      renderText(e.getMessage());
      return;
    }
    if (app.getTask() != null) {
      setTitle(join("Attempts for ", $(TASK_ID)));
    }
    render(taskPage());
  }
@Test
  public void testTask() {
 
    appController.task();
    assertEquals("Attempts for " + taskId ,
        appController.getProperty().get("title"));

    assertEquals(TaskPage.class, appController.getClazz());
  }