Add test of Source().build().

Refactored a few mocking methods into a common base as well as add
information about mocks in test classes.  Added a generated command test
to verify the build instructions are created properly.