// Start working with same Entity in another UoW, and complete it
UnitOfWork unitOfWork = module.newUnitOfWork();
TestEntity testEntity2 = unitOfWork.get( testEntity );
assertThat( "version is correct", spi.entityStateOf( testEntity1 ).version(), equalTo( version ) );
testEntity2.name().set( "B" );
unitOfWork.complete();
}
{
// Try to complete first UnitOfWork
try
{