@Test(expected = LockingException.class)
@Transactional
public void lockingTemplateParallel() {

	Template<?> template1 = unlockedTemplate();
	Template<?> template2 = unlockedTemplate();
	template1 = repository.lockForEdit(template1, new User("first", "First"));
	User second = new User("second", "Second User");
	repository.lockForEdit(template2, second);
	fail(LockingException.class + " expected");
}