add test code for barcodescanner