Fixed a test issue and formatted output for tests