Parking { public int getAvailableBays() { return (int) slots.stream() .filter(ParkingSlot::isFree) .count(); } Parking(int edge, Set<Integer> pedestrianEntries, Set<Integer> disabledBays); int parkCar(char carType); boolean unparkCar(int index); @Override String toString(); int getAvailableBays();  }
@Test public void testGetAvailableBays() { assertEquals(23, parking.getAvailableBays()); }