test throwing custom checked exception