public String toJsonString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
            throw new RuntimeException(e);
        }
    }
@Test
    void toJsonString() throws JsonProcessingException {
        ObjectMapper objectMapper = new ObjectMapper();
        NamingServerNode node = new NamingServerNode();
        Map<String,Object> map = new HashMap<>();
        map.put("k","v");
        node.setMetadata(map);
        node.setGroup("group");
        node.setControl(new Node.Endpoint("1.1.1.1",888));
        node.setTransaction(new Node.Endpoint("2.2.2.2",999));
        System.out.println(node.toJsonString());
        assertEquals(node.toJsonString(),objectMapper.writeValueAsString(node));
    }