Unit tests for dump

Got coverage up to 90% probably need @IMSoP to finish the rest as I'm having
a hard time getting tests to hit the logic.