Changed ObjectFactoryTests to use FluentAssertions

.. also moved helper classes and fixed a yaml template bug in the tests.