Refactoring unit tests into a command line utility