public Collection<RenderingMode> getRenderingModes(ReportDefinition definition) {
   List<RenderingMode> ret = new ArrayList<RenderingMode>();
   if (definition.getName().contains("Appointment")) {
     ret.add(new RenderingMode(this, this.getLabel(), this.getLabel(), Integer.MAX_VALUE - 5));
   }
   return ret;
 }
  @Override
  public boolean canRender(ReportDefinition reportDefinition) {

    if (reportDefinition.getName().contains("Appointment")) {
      return true;
    }
    return false;
  }
  /** Tests that the Report and associated ReportDesigns are successfully saved */
  @Test
  public void shouldSetupReport() throws Exception {
    List<ReportDefinition> l = getReportDefinitionService().getDefinitions(getReportName(), true);
    Assert.assertEquals(0, l.size());

    ReportDefinition reportDefinition = setupReport();
    Assert.assertEquals(getReportName(), reportDefinition.getName());

    ReportService rs = Context.getService(ReportService.class);
    List<ReportDesign> designs = rs.getReportDesigns(reportDefinition, null, false);

    Assert.assertEquals(getReportDesignNames().size(), designs.size());
    int numMatches = 0;
    for (ReportDesign rd : designs) {
      if (getReportDesignNames().contains(rd.getName())) {
        numMatches++;
      }
    }
    Assert.assertEquals(getReportDesignNames().size(), numMatches);
  }