Minor refactor of unit tests