Fixed thrown exception and test