@Before fun onBefore() { tut = TransportUnitType("TUT") loc1 = Location(LocationPK("AREA", "ASL", "X", "Y", "Z")) loc2 = Location(LocationPK("ARE2", "ASL2", "X2", "Y2", "Z2")) product = Product("tttt") entityManager.persist(product) entityManager.persist(tut) entityManager.persist(loc1) entityManager.persist(loc2) tu = TransportUnit("TEST") tu.setTransportUnitType(tut) tu.setActualLocation(loc1) entityManager.persist(tu) entityManager.flush() }
Setup some test data .