Added exception testing