Suggestion:  Functions this long w/ big nested sections are normally more readable if you break the big nested sections into their own method/function.  It helps with the line-wrapping and debugging.  I think this is probably okay for now, but it'll need to get split up if/when the test expands.