test for InvalidArgumentException