@Test
  public void theLaddersCanViewAggregateJobNumbersByRecruiterAppliedToBy1Person()
      throws IOException {
    StringWriter writer = new StringWriter();
    underTest.showNumberOfApplicationsByRecruiter(recruiterWithOneApplication, writer);

    assertThat(writer.toString(), containsString("The recruiter named 'One' has 1 application."));
  }
  @Test
  public void theLaddersCanViewAggregateJobNumbersByJobAppliedToByNobody() throws IOException {
    StringWriter writer = new StringWriter();
    underTest.showNumberOfApplicationsPostedFor(new AtsJob(new JobTitle("Food Taster")), writer);

    assertThat(
        writer.toString(),
        containsString("The job titled 'Food Taster' has not been applied to by anyone."));
  }
  @Test
  public void theLaddersCanViewAggregateJobNumbersByJobAppliedToBy2People() throws IOException {
    StringWriter writer = new StringWriter();
    underTest.showNumberOfApplicationsPostedFor(jobWithTwoApplicants, writer);

    assertThat(
        writer.toString(),
        containsString("The job titled 'Saucier' has been applied to by 2 people."));
  }
  @Test
  public void theLaddersCanViewAggregateJobNumbersByJobAppliedToBy1Person() throws IOException {
    StringWriter writer = new StringWriter();
    underTest.showNumberOfApplicationsPostedFor(jobWithOneApplicant, writer);

    assertThat(
        writer.toString(),
        containsString("The job titled 'Dishwasher' has been applied to by 1 person."));
  }
  @Test
  public void theLaddersCanViewAggregateJobNumbersByRecruiterAppliedToByNobody()
      throws IOException {
    StringWriter writer = new StringWriter();
    underTest.showNumberOfApplicationsByRecruiter(new Recruiter(new Name("None")), writer);

    assertThat(
        writer.toString(), containsString("The recruiter named 'None' has no applications."));
  }
  @Test
  public void theLaddersCanViewAllApplicationsOnASpecifiedDate() throws IOException {
    LocalDate today = new LocalDate();
    StringWriter writer = new StringWriter();
    underTest.showApplicationsPostedOn(today, writer);

    String dateString = today.toString();
    assertThat(writer.toString(), containsString("- Ina applied to Saucier on " + dateString));
    assertThat(writer.toString(), containsString("- Bobby applied to Saucier on " + dateString));
    assertThat(writer.toString(), containsString("- Mario applied to Dishwasher on " + dateString));
    assertThat(
        writer.toString(),
        containsString("- Bobby applied to Chef Garde Manager on " + dateString));
  }