public boolean hasCapacity(Node host, NodeResources requestedCapacity) {
        return availableCapacityOf(host).satisfies(requestedCapacity);
    }
@Test
    public void hasCapacity() {
        assertTrue(capacity.hasCapacity(host1, resources0));
        assertTrue(capacity.hasCapacity(host1, resources1));
        assertTrue(capacity.hasCapacity(host2, resources0));
        assertTrue(capacity.hasCapacity(host2, resources1));
        assertTrue(capacity.hasCapacity(host3, resources0));
        assertTrue(capacity.hasCapacity(host3, resources1));
        assertFalse(capacity.hasCapacity(host4, resources0));  // No IPs available
        assertFalse(capacity.hasCapacity(host4, resources1)); // No IPs available

        // Add a new node to host1 to deplete the memory resource
        Node nodeF = Node.reserve(List.of("::6"), "nodeF", "host1", resources0, NodeType.tenant).build();
        nodes.add(nodeF);
        capacity = new HostCapacity(new LockedNodeList(nodes, () -> {}), hostResourcesCalculator);
        assertFalse(capacity.hasCapacity(host1, resources0));
        assertFalse(capacity.hasCapacity(host1, resources1));
    }