in itests/jpa-container-blueprint-testbundle/src/main/java/org/apache/aries/jpa/container/itest/bundle/blueprint/impl/CarLifeCycle.java [39:60]
public void run() {
Car car = new Car();
UUID uuid = UUID.randomUUID();
String id = "blue " + uuid.toString();
car.setEngineSize(1);
car.setNumberPlate(id);
carService.addCar(car);
EntityManager em = getEmFromCoord();
if (!em.contains(car)) {
throw new IllegalStateException("Transaction should cause EntityManager to be kept open");
}
readAndUpdate(id);
Car car3 = carService.getCar(id);
if (car3.getEngineSize() != 100) {
throw new IllegalStateException("Engine size should have been changed to 100");
}
carService.deleteCar(id);
Car car2 = carService.getCar(id);
if (car2 != null) {
throw new RuntimeException("Car with id " + id + " should be deleted"); // NOSONAR
}
}