Added test for throwing an exception BadTypeException
Update annotation