def test_heat_on(self):
        mock_port_agent = Mock(spec=PortAgentClient)
        driver = InstrumentDriver(self._got_data_event_callback)

        def my_send(data):
            log.debug("my_send: %s", data)
            driver._protocol._promptbuf += HEAT_ON_COMMAND_RESPONSE
            return len(HEAT_ON_COMMAND_RESPONSE)

        mock_port_agent.send.side_effect = my_send

        # Put the driver into test mode
        driver.set_test_mode(True)

        current_state = driver.get_resource_state()
        self.assertEqual(current_state, DriverConnectionState.UNCONFIGURED)

        # Now configure the driver with the mock_port_agent, verifying
        # that the driver transitions to that state
        config = {'mock_port_agent': mock_port_agent}
        driver.configure(config=config)

        current_state = driver.get_resource_state()
        self.assertEqual(current_state, DriverConnectionState.DISCONNECTED)

        # Invoke the connect method of the driver: should connect to mock
        # port agent.  Verify that the connection FSM transitions to CONNECTED,
        # (which means that the FSM should now be reporting the ProtocolState).
        driver.connect()
        current_state = driver.get_resource_state()
        self.assertEqual(current_state, DriverProtocolState.UNKNOWN)

        # Force the instrument into a known state
        self.assert_force_state(driver, DriverProtocolState.COMMAND)

        result = driver._protocol._handler_command_heat_on()
        ts = ntplib.system_to_ntp_time(time.time())
        result = driver._protocol._got_chunk(HEAT_ON_COMMAND_RESPONSE, ts)