2 * Copyright (c) 2010-2022 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.tplinksmarthome.internal.device;
15 import static org.hamcrest.MatcherAssert.assertThat;
16 import static org.hamcrest.core.Is.is;
18 import java.io.IOException;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.junit.jupiter.api.Test;
24 * Test class to test if text read from the device is correctly decoded to handle special characters.
26 * @author Hilbrand Bouwkamp - Initial contribution
29 public class EncodingTest extends DeviceTestBase<SwitchDevice> {
31 public EncodingTest() throws IOException {
32 super(new SwitchDevice(), "encoding_test");
36 public void testCorrectDecodingOfText() throws IOException {
37 assertThat("Alias incorrectly decoded", deviceState.getSysinfo().getAlias(), is("MyßmärtPlug"));