added tests for file_lock, commands_required and enforce functions