Added exception and test for exception in form builder class