@Override
    public boolean isInfinite() {
        return cpu == Double.POSITIVE_INFINITY || network == Double.POSITIVE_INFINITY;
    }
@Test
    public void testIsInfinite() {
        CostFactory factory = CostFactory.INSTANCE;

        assertFalse(factory.makeCost(1.0, 2.0d, 3.0d).isInfinite());

        assertTrue(factory.makeCost(1.0, Double.POSITIVE_INFINITY, 3.0d).isInfinite());
        assertTrue(factory.makeCost(1.0, 2.0d, Double.POSITIVE_INFINITY).isInfinite());
        assertTrue(factory.makeCost(1.0, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY).isInfinite());
        assertTrue(factory.makeInfiniteCost().isInfinite());
    }