Unit tests for lock/unlock event in service