assertThat(loaded).isNull();
}
@Test
public void idClassTest() {
IdClassCar car = new IdClassCar();
car.setBrand("Kia");
car.setYear(2012);
car.setSerialNo("6675");
em.persist(car);
em.flush();
em.clear();
IdClassCar loaded = em.find(IdClassCar.class, new CarIdentifier("Kia", 2012));
assertThat(loaded).isNotNull();
assertThat(loaded.getBrand()).isNotNull();
assertThat(loaded.getBrand()).isEqualTo("Kia");
loaded.setSerialNo("5081");
em.persist(loaded);
em.flush();
em.clear();
loaded = em.find(IdClassCar.class, new CarIdentifier("Kia", 2012));
assertThat(loaded).isNotNull();
assertThat(loaded.getBrand()).isNotNull();
assertThat(loaded.getBrand()).isEqualTo("Kia");
em.remove(loaded);
em.flush();
em.clear();