Mock parses input and returns error with the desired error-code