removed duplicate 'when' block
added notThrown example
formatted file
added basic examples