{
TesterRepositoryCheckController checkController = new TesterRepositoryCheckController(repository);
NodeImpl node1 = (NodeImpl)addTestNode(repository);
NodeImpl node2 = (NodeImpl)addTestNode(repository);
PropertyImpl prop = (PropertyImpl)addTestProperty(repository, node1);
assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_CONSISTENT_MESSAGE));
updateNodeRecord(repository, node2.getInternalIdentifier(), 1, 1);
assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_CONSISTENT_MESSAGE));
insertPropertyRecord(repository, prop.getInternalIdentifier(), prop.getParentIdentifier(), prop.getName());
assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_NOT_CONSISTENT_MESSAGE));
checkController.repairDataBase("yes");
assertTrue(checkController.checkDataBase().startsWith(RepositoryCheckController.REPORT_CONSISTENT_MESSAGE));
}