@Test
@Transactional
public void lockingLockedTemplate() {

	WordTemplate<?> toLock = lockedTemplate();
	User second = new User("second", "Second User");
	try {
		repository.lockForEdit(toLock, second);
		fail(LockingException.class + " expected");
	} catch (LockingException e) {
		assertTrue(isVersionIncontext(toLock));
	}
}