Fixed unit tests. Moved function which was just used in unit tests to BaseUnitTest class.