create test which assert throwing exception