Moved mockCommand and checkFactory to a shortcuts file.
Added tests for server factory functions.