#1638: Extracted samples unit test into separate folder, extracted utility methods and added a unit test for the multiplexer problem.