add test for error when invalid unit used