test: update test to assert throw/doesNotThrow