public static void saveConsanguinity(Consanguinity consanguinity) {
        if (CONSANGUINITY_MAP.containsKey(consanguinity.getServiceKey())) {
            Consanguinity consanguinityOld = CONSANGUINITY_MAP.get(consanguinity.getServiceKey());
            consanguinityOld.setProviders(consanguinity.getProviders());
        } else {
            CONSANGUINITY_MAP.putIfAbsent(consanguinity.getServiceKey(), consanguinity);
        }
    }
@Test
    public void saveConsanguinity() {
        Consanguinity consanguinity = new Consanguinity();
        List<Contract> contractList = new ArrayList<>();
        Contract contract = new Contract();
        contract.setIp(DEFAULT_IP);
        contract.setPort(DEFAULT_PORT);
        contractList.add(contract);
        consanguinity.setProviders(contractList);
        consanguinity.setServiceKey(CollectorCacheTest.class.getName());
        CollectorCache.saveConsanguinity(consanguinity);
        Assert.assertFalse(CollectorCache.CONSANGUINITY_MAP.isEmpty());
        Assert.assertTrue(CollectorCache.CONSANGUINITY_MAP.containsKey(CollectorCacheTest.class.getName()));
    }