@Override
    public boolean releaseIp(String networkId, IpAddress ipAddress) {
        IpAddress releasedIp = allocatedIps(networkId).stream()
                .filter(ip -> ip.equals(ipAddress))
                .findFirst().orElse(null);
        if (releasedIp != null) {
            String ipamId = networkId + "-" + releasedIp.toString();
            k8sIpamStore.removeAllocatedIp(ipamId);
            k8sIpamStore.createAvailableIp(
                    new DefaultK8sIpam(ipamId, releasedIp, networkId));

            log.info("Release the IP {}", releasedIp.toString());

            return true;
        } else {
            log.warn("Failed to find requested IP {} for releasing...", ipAddress.toString());
        }

        return false;
    }
@Test
    public void testReleaseIp() {
        createBasicIpPool();

        IpAddress allocatedIp1 = target.allocateIp(NETWORK_ID);
        IpAddress allocatedIp2 = target.allocateIp(NETWORK_ID);

        assertEquals("Number of allocated IPs did not match", 2,
                target.allocatedIps(NETWORK_ID).size());
        assertEquals("Number of available IPs did not match", 0,
                target.availableIps(NETWORK_ID).size());

        target.releaseIp(NETWORK_ID, allocatedIp1);

        assertEquals("Number of allocated IPs did not match", 1,
                target.allocatedIps(NETWORK_ID).size());
        assertEquals("Number of available IPs did not match", 1,
                target.availableIps(NETWORK_ID).size());

        target.releaseIp(NETWORK_ID, allocatedIp2);

        assertEquals("Number of allocated IPs did not match", 0,
                target.allocatedIps(NETWORK_ID).size());
        assertEquals("Number of available IPs did not match", 2,
                target.availableIps(NETWORK_ID).size());
    }