@Override
    public ObjectNode encode(K8sIpam ipam, CodecContext context) {
        checkNotNull(ipam, "Kubernetes IPAM cannot be null");

        return context.mapper().createObjectNode()
                .put(IPAM_ID, ipam.ipamId())
                .put(IP_ADDRESS, ipam.ipAddress().toString())
                .put(NETWORK_ID, ipam.networkId());
    }
@Test
    public void testK8sIpamEncode() {
        K8sIpam ipam = new DefaultK8sIpam("network-1-10.10.10.10",
                IpAddress.valueOf("10.10.10.10"), "network-1");

        ObjectNode nodeJson = k8sIpamCodec.encode(ipam, context);
        assertThat(nodeJson, matchesK8sIpam(ipam));
    }