def METHOD_NAME(monkeypatch, dev: device.Device):
    # setup
    mock_bat_value_store = Mock()
    monkeypatch.setattr(bat, "get_bat_value_store", Mock(return_value=mock_bat_value_store))
    mock_counter_value_store = Mock()
    monkeypatch.setattr(counter, "get_counter_value_store", Mock(return_value=mock_counter_value_store))
    mock_inverter_value_store = Mock()
    monkeypatch.setattr(inverter, "get_inverter_value_store", Mock(return_value=mock_inverter_value_store))
    monkeypatch.setattr(device.Device, "_update_session_key", Mock())
    monkeypatch.setattr(device.Device, "_request_data", Mock(
        side_effect=[HTTPError, sample_auth_key_valid]))
    component_config = bat.component_descriptor.configuration_factory()
    component_config.id = None
    dev.add_component(component_config)
    component_config = counter.component_descriptor.configuration_factory()
    component_config.id = 1
    dev.add_component(component_config)
    component_config = inverter.component_descriptor.configuration_factory()
    component_config.id = 2
    dev.add_component(component_config)
    # execution
    dev.update()
    # evaluation
    assert_battery_state_correct(mock_bat_value_store.set.call_args[0][0])
    assert_counter_state_correct(mock_counter_value_store.set.call_args[0][0])
    assert_inverter_state_correct(mock_inverter_value_store.set.call_args[0][0])