Extracted an interface from machine for use with mocking.
Refactored LinInstructionTest to make it belong to the test package.
TODO next: Extract interfaces for the other classes, except instruction
related ones.