@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        HostInfo hostInfo = (HostInfo) o;

        if (!hostname.equals(hostInfo.hostname)) return false;
        if (services != null ? !services.equals(hostInfo.services) : hostInfo.services != null) return false;

        return true;
    }
@Test
    public void testEquals() {
        HostInfo a = new HostInfo("foo.yahoo.com", List.of(new ServiceInfo("foo", "bar", null, null, "config-id", "host-name")));
        HostInfo b = new HostInfo("foo.yahoo.com", List.of(new ServiceInfo("foo", "bar", null, null, "config-id", "host-name")));
        HostInfo c = new HostInfo("foo.yahoo.com", List.of(new ServiceInfo("foo", "baz", null, null, "config-id", "host-name")));
        HostInfo d = new HostInfo("foo.yahoo.com", List.of(new ServiceInfo("bar", "baz", null, null, "config-id", "host-name")));
        HostInfo e = new HostInfo("bar.yahoo.com", null);
        assertEquals(a, b);
        assertNotEquals(a, c);
        assertNotEquals(a, d);
        assertNotEquals(a, d);
        assertNotEquals(c, d);
        assertNotEquals(c, e);
        assertNotEquals(d, e);
    }