Test for exceptions raised in builder methods

As described in #27.