2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.rfxcom.internal.messages;
16 import java.util.concurrent.ConcurrentHashMap;
18 import org.openhab.binding.rfxcom.internal.handler.DeviceState;
19 import org.openhab.core.types.Type;
22 * Mock implementation for the DeviceState
24 * @author Martin van Wingerden - Initial contribution
26 public class MockDeviceState implements DeviceState {
27 private final Map<String, Type> stateMap = new ConcurrentHashMap<>();
30 public Type getLastState(String channelId) {
31 return stateMap.get(channelId);
34 public void set(String channelId, Type state) {
35 stateMap.put(channelId, state);