Added test for method scan()
Fixed exception