GuestService { public List<Guest> getAllGuests() { CriteriaQuery<Guest> cq = this.em.getCriteriaBuilder().createQuery(Guest.class); cq.select(cq.from(Guest.class)); return this.em.createQuery(cq).getResultList(); } GuestService(); @Inject  GuestService(@Background Event<Guest> guestEvents); void setEntityManager(EntityManager em); void saveGuest(Guest guest); Guest findSingleGuestById(@PathParam("guestId") Long guestId); List<Guest> getAllGuests(); Optional<Guest> findById(@PathParam("guestId") Long guestId); Optional<Guest> updateGuestDetails(Guest guest); Optional<Guest> findByPublicId(String publicId); boolean deleteGuest(@NotNull String publicId);  }
@Test public void finding_all_guests_does_not_return_null() { assertThat(guestService.getAllGuests()).isNotNull(); }