@Test
@Transactional
public void lockingTwice() {

	Template<?> template = unlockedTemplate();
	User user = new User("user", "User");
	template = repository.lockForEdit(template, user);
	template = repository.lockForEdit(template, user);
	assertEquals(user, template.getLockingUser());
}