Follow-up to the previous implementation on the linked PR.
Motivation and Proposed solution
This adds tests and uses a slightly different implementation that is less repetitive and more easily expandable if needed.
Current PR Issues
Tests aren't very exhaustive.
There's also no check to see if the lock options are being applied to a