Refactored build command tests.