According to the spec, the payload for debug directories can be in parts of the binary that aren't mapped at runtime - in these cases, AddressOfRawData is just set to zero.
Just skip trying to print the payload in these cases, for now. If we'd really want to print that, we'd need a binary test input file as yaml2obj can't easily be tricked into placing data in padding areas of the file.)
It might be worth a comment at the start of this test explaining what exactly is being tested, as it's not particularly obvious to me just looking at the test.