// select c from Customer c where c.firstName = 'Vincent'
CriteriaBuilder builder = em.getCriteriaBuilder();
CriteriaQuery<Customer24> criteriaQuery = builder.createQuery(Customer24.class);
Root<Customer24> c = criteriaQuery.from(Customer24.class);
criteriaQuery.select(c).where(builder.equal(c.get("firstName"), "Vincent"));
assertEquals(2, em.createQuery(criteriaQuery).getResultList().size());
}
@Test(expected = IllegalArgumentException.class)
public void shouldFailBecauseFirstnameIsSpelledIncorrectly() throws Exception {