private void checkConsistentLocksInDataBase(ManageableRepository repository) throws Exception
{
try
{
TesterRepositoryCheckController checkController = new TesterRepositoryCheckController(repository);
Node node = addTestNode(repository);
lockNode(node);
assertResult(checkController.checkDataBase(), checkController.getLastReportPath(), true);
//assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_CONSISTENT_MESSAGE));
removePropertyInDB(repository, (PropertyImpl)node.getProperty("jcr:lockIsDeep"));
removePropertyInDB(repository, (PropertyImpl)node.getProperty("jcr:lockOwner"));
assertResult(checkController.checkDataBase(), checkController.getLastReportPath(), false);
//assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_NOT_CONSISTENT_MESSAGE));
checkController.repairDataBase("yes");
assertResult(checkController.checkDataBase(), checkController.getLastReportPath(), true);
//assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_CONSISTENT_MESSAGE));
}
finally
{
if (repository != null)