Barcode isValidBarcode() and BarcodeTest