In this case I was trying to test the behavior when we had a string that was read in as UTF-8 but had invalid UTF-8, for instance when a command was executed and returned non UTF-8. In this case the encoding would be right but the actual data wouldn't match the encoding. I added this test case in light of https://github.com/puppetlabs/facter/pull/566 where we were reading in binary data in a UTF-8 tagged string. How can this test be changed to make this more clear?