@Override
    public String toString() {
        return "Service{" + "name='" + name + '\'' + ", protectThreshold=" + protectThreshold + ", appName='" + appName
                + '\'' + ", groupName='" + groupName + '\'' + ", metadata=" + metadata + '}';
    }
@Test
    void testToString() {
        Service service = new Service("service");
        service.setGroupName("group");
        service.setAppName("app");
        service.setProtectThreshold(1.0f);
        service.setMetadata(Collections.singletonMap("a", "b"));
        assertEquals("Service{name='service', protectThreshold=1.0, appName='app', groupName='group', metadata={a=b}}",
                service.toString());
    }