Add and test ScanById method