Bug 40275 introduced this method and this is the missing place for refactoring. The current tests for this method include the creation of actually conflicting patrons, matching their userid and cardnumber respectively. As making the proposed change is indeed a behavior change, I file this report in order to discuss how to handle it properly. The other use cases are clear and already covered in bug 40275. The blocker for this is bug 33905, in which we need to decide how to ensure identifier uniqueness, and then get rid of the tests.