### Question:
EmployeeRepository { public List<Employee> all() { return em.createNamedQuery("Employee.findAll", Employee.class).getResultList(); }  void persist(Employee e); List<Employee> all();  }### Answer:
@Test public void should_return_all_employee_records() throws Exception { final List<Employee> actualEmployees = repository.all(); assertTrue(actualEmployees.size() == 6); List<Employee> expectedEmployees = asList( employee("Leonard", "11-22-33-44"), employee("Sheldon", "22-33-44-55"), employee("Penny", "33-44-55-66"), employee("Raj", "44-55-66-77"), employee("Howard", "55-66-77-88"), employee("Bernadette", "66-77-88-99")); for (Employee employee : expectedEmployees) { assertTrue(actualEmployees.contains(employee)); } }