Added changes to CommandMapper to handle exceptions; tests for this
class