Added verify function to avoid throwing so many runtime exceptions in the tests