Test refactoring and improvements to dynamic date tests