In order to make the code more readable, separate the tests into different files for each handler. Additionally, extract the helper methods into a separate module which may be included as needed.