class ThingHelper {

    public static boolean equals(Thing a, Thing b) {
        if (!a.getUID().equals(b.getUID())) {
            return false;
        }
        // bridge
        if (!Objects.equals(a.getBridgeUID(), b.getBridgeUID())) {
            return false;
        }
        // configuration
        if (!Objects.equals(a.getConfiguration(), b.getConfiguration())) {
            return false;
        }
        // label
        if (!Objects.equals(a.getLabel(), b.getLabel())) {
            return false;
        }
        // location
        if (!Objects.equals(a.getLocation(), b.getLocation())) {
            return false;
        }
        // channels
        List<Channel> channelsOfA = a.getChannels();
        List<Channel> channelsOfB = b.getChannels();
        if (channelsOfA.size() != channelsOfB.size()) {
            return false;
        }
        if (!toString(channelsOfA).equals(toString(channelsOfB))) {
            return false;
        }
        return true;
    }

}