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.sensibo.internal.dto;
15 import static org.junit.jupiter.api.Assertions.*;
17 import java.io.IOException;
18 import java.lang.reflect.Type;
19 import java.util.ArrayList;
20 import java.util.List;
22 import org.junit.jupiter.api.Test;
23 import org.openhab.binding.sensibo.internal.dto.pods.PodDTO;
25 import com.google.gson.reflect.TypeToken;
28 * @author Arne Seime - Initial contribution
30 public class GetPodsResponseTest extends AbstractSerializationDeserializationTest {
33 public void testDeserialize() throws IOException {
34 final Type type = new TypeToken<ArrayList<PodDTO>>() {
37 final List<PodDTO> rsp = wireHelper.deSerializeResponse("/get_pods_response.json", type);
39 assertEquals(1, rsp.size());
40 assertEquals("PODID", rsp.get(0).id);