Reworked unit tests to a cleaner structure