(Maint) Remove duplication and mocking from tests
The tests used to have a large amount of duplication around setting
configuration values for Hiera, this extracts them into a common spot
and also removes some of the mocking that was being done in order to
make the tests a little more straightforward and less tied to the
implementation.