// Path: warehouse-model/src/main/java/warehouse/BoxLabel.java
// @Value
// public class BoxLabel {
//     private final String refNo;
//     private final int quantity;
//     private final String boxType;
// }


import lombok.Value;
import warehouse.BoxLabel;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toMap;
        );
    }

    private Stream<String> notFound(RegisterNew registerNew) {
        Set<String> actual = scannedRefNos(registerNew).collect(Collectors.toSet());
        return expected().filter(expected -> !actual.contains(expected));
    }

    private Stream<String> scannedRefNos(RegisterNew registerNew) {
        return registerNew.getScannedBoxes().stream()
                .map(BoxLabel::getRefNo);
    }

    private Stream<String> expected() {
        return requiredPositions.keySet().stream();
    }

    private Stream<Scanned> scanned(RegisterNew registerNew) {
        return IntStream.range(0, registerNew.getScannedBoxes().size())
                .mapToObj(index -> scannedAtIndex(registerNew, index));
    }

    private Scanned scannedAtIndex(RegisterNew registerNew, int index) {
        String refNo = registerNew.getScannedBoxes().get(index).getRefNo();
        return new Scanned(refNo, index, requiredPositions.getOrDefault(refNo, null));
    }

    @Value
    private static class Scanned {
        String refNo;
// Path: warehouse-model/src/main/java/warehouse/BoxLabel.java
// @Value
// public class BoxLabel {
//     private final String refNo;
//     private final int quantity;
//     private final String boxType;
// }


// Path: warehouse-model/src/main/java/warehouse/products/CartValidator.java
import lombok.Value;
import warehouse.BoxLabel;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toMap;

        );
    }

    private Stream<String> notFound(RegisterNew registerNew) {
        Set<String> actual = scannedRefNos(registerNew).collect(Collectors.toSet());
        return expected().filter(expected -> !actual.contains(expected));
    }

    private Stream<String> scannedRefNos(RegisterNew registerNew) {
        return registerNew.getScannedBoxes().stream()
                .map(BoxLabel::getRefNo);
    }

    private Stream<String> expected() {
        return requiredPositions.keySet().stream();
    }

    private Stream<Scanned> scanned(RegisterNew registerNew) {
        return IntStream.range(0, registerNew.getScannedBoxes().size())
                .mapToObj(index -> scannedAtIndex(registerNew, index));
    }

    private Scanned scannedAtIndex(RegisterNew registerNew, int index) {
        String refNo = registerNew.getScannedBoxes().get(index).getRefNo();
        return new Scanned(refNo, index, requiredPositions.getOrDefault(refNo, null));
    }

    @Value
    private static class Scanned {
        String refNo;
        int actualIndex;