@Test public void recruitersCanDisplayJobsTheyPosted() { setupActors(); JobRepository jobRepository = new JobRepository(); JobPosting developerPosting = recruiter.post(developerJob).to(jobRepository); JobPosting architectPosting = recruiter.post(architectJob).to(jobRepository); JobPosting programmerPosting = recruiter.post(programmerJob).to(jobRepository); JobPostings jobPostings = recruiter.getPostedJobs().from(jobRepository); JobPostingsDisplayer postingsDisplayer = Mockito.mock(JobPostingsDisplayer.class); jobPostings.displayTo(postingsDisplayer); Mockito.verify(postingsDisplayer) .displayJobPostings( Matchers.argThat( new SetOfThreeJobPostings(developerPosting, architectPosting, programmerPosting))); }