BUG: [GH 11738] Fix for end_time when multiple of a frequency is requested
closes #11738 
1. Added a new test with the multiple of a frequency. 
2. Rearranged some tests to improve readability of the code.
