Refactored SetLegacyStatus - use right-shift to calculate range from prefix length.
Refactored SetLegacyStatus - renamed methods and fixed tests (verify mock).