Suggestion: You can greatly reduce the number of conditionals and nested conditionals here by just checking the positive cases.  Anything unexpected should raise an exception and all uncaught exceptions will fail the test automatically.  It's okay to exploit this and just let the test fail.  When or if it's important for someone to debug WHY it failed (assuming it was not a test-bug) they can investigate manually.  Really the only reason to log debugging messages is to help spot problems in the test code, not always the code-being-tested.  Does that make sense?