Implement hook in test models for testing locks