// Path: warehouse-model/src/test/java/tools/FunkyDateHolder.java
// public class FunkyDateHolder {
// 
//     private LocalDate current = forString("some day");
//     private Clock clock;
// 
//     public FunkyDateHolder() {
//         this.clock = Clock.systemDefaultZone();
//     }
// 
//     public FunkyDateHolder(Clock clock) {
//         this.clock = clock;
//     }
// 
//     public LocalDateTime get() {
//         return current.atTime(LocalTime.now(clock));
//     }
// 
//     public void set(String day) {
//         current = forString(day);
//     }
// 
//     private LocalDate forString(String day) {
//         switch (day) {
//             case "some day":
//                 return LocalDate.of(2016, Month.JANUARY, 8);
//             case "same day":
//                 return current;
//             case "next day":
//                 return current.plusDays(1);
//             default:
//                 return LocalDate.parse(day);
//         }
//     }
// }
// 
// Path: warehouse-model/src/main/java/warehouse/Labels.java
// public interface Labels {
//     PaletteLabel newPalette(String refNo);
// 
//     PaletteLabel scanPalette(String label);
// 
//     BoxLabel scanBox(String label);
// }
// 
// Path: warehouse-model/src/main/java/warehouse/PaletteLabel.java
// @Value
// public class PaletteLabel {
//     private final String id;
//     private final String refNo;
// 
//     @Override
//     public String toString() {
//         return id;
//     }
// }
// 
// Path: warehouse-model/src/main/java/warehouse/TLabelsFormats.java
// public class TLabelsFormats implements Labels {
// 
//     private final AtomicInteger index;
// 
//     public TLabelsFormats(int lastIndex) {
//         this.index = new AtomicInteger(lastIndex);
//     }
// 
//     @Override
//     public PaletteLabel newPalette(String refNo) {
//         String suffix = String.format("%04X", index.getAndIncrement());
//         return new PaletteLabel("P-" + refNo + "-" + suffix, refNo);
//     }
// 
//     @Override
//     public PaletteLabel scanPalette(String label) {
//         String[] pieces = label.split("-");
//         if (!label.startsWith("P-")) {
//             throw new IllegalArgumentException("Label need to start with 'P-' characters, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         if (pieces.length != 3) {
//             throw new IllegalArgumentException("Label need to have two '-' characters, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         if (pieces[1].isEmpty()) {
//             throw new IllegalArgumentException("Label has empty refNo, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         if (pieces[2].isEmpty()) {
//             throw new IllegalArgumentException("Label has empty index, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         return new PaletteLabel(label, pieces[1]);
//     }
// 
//     @Override
//     public BoxLabel scanBox(String label) {
//         String[] pieces = label.split("-");
//         if (!label.startsWith("B-")) {
//             throw new IllegalArgumentException("Label need to start with 'B-' characters, format: B-<refNo>-<quantity>-<boxType>, ex: B-900300-24-B");
//         }
//         if (pieces.length != 4) {
//             throw new IllegalArgumentException("Label need to have three '-' characters, format: B-<refNo>-<quantity>-<boxType>, ex: B-900300-24-B");
//         }
//         return new BoxLabel(pieces[1], Integer.valueOf(pieces[2]), pieces[3]);
//     }
// }
// 
// Path: warehouse-model/src/main/java/warehouse/locations/Location.java
// @Value
// public class Location {
//     private final String location;
// 
//     public static Location production() {
//         return new Location("production");
//     }
// 
//     public static Location quarantine() {
//         return new Location("quarantine");
//     }
// 
//     public static Location onTheMove(String user) {
//         return new Location("picked by " + user);
//     }
// 
//     public static Location unknown() {
//         return new Location("<unknown>");
//     }
// }


import cucumber.api.java.en.And;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import lombok.Data;
import org.assertj.core.api.Assertions;
import tools.FunkyDateHolder;
import warehouse.Labels;
import warehouse.PaletteLabel;
import warehouse.TLabelsFormats;
import warehouse.locations.Location;
import java.util.List;
package warehouse.picklist;



/**
 * Created by michal on 02.07.2016.
 */
public class FifoPickingSteps {

    private PickList pickList;

    @Data
    public static class StockEntry {
// Path: warehouse-model/src/test/java/tools/FunkyDateHolder.java
// public class FunkyDateHolder {
// 
//     private LocalDate current = forString("some day");
//     private Clock clock;
// 
//     public FunkyDateHolder() {
//         this.clock = Clock.systemDefaultZone();
//     }
// 
//     public FunkyDateHolder(Clock clock) {
//         this.clock = clock;
//     }
// 
//     public LocalDateTime get() {
//         return current.atTime(LocalTime.now(clock));
//     }
// 
//     public void set(String day) {
//         current = forString(day);
//     }
// 
//     private LocalDate forString(String day) {
//         switch (day) {
//             case "some day":
//                 return LocalDate.of(2016, Month.JANUARY, 8);
//             case "same day":
//                 return current;
//             case "next day":
//                 return current.plusDays(1);
//             default:
//                 return LocalDate.parse(day);
//         }
//     }
// }
// 
// Path: warehouse-model/src/main/java/warehouse/Labels.java
// public interface Labels {
//     PaletteLabel newPalette(String refNo);
// 
//     PaletteLabel scanPalette(String label);
// 
//     BoxLabel scanBox(String label);
// }
// 
// Path: warehouse-model/src/main/java/warehouse/PaletteLabel.java
// @Value
// public class PaletteLabel {
//     private final String id;
//     private final String refNo;
// 
//     @Override
//     public String toString() {
//         return id;
//     }
// }
// 
// Path: warehouse-model/src/main/java/warehouse/TLabelsFormats.java
// public class TLabelsFormats implements Labels {
// 
//     private final AtomicInteger index;
// 
//     public TLabelsFormats(int lastIndex) {
//         this.index = new AtomicInteger(lastIndex);
//     }
// 
//     @Override
//     public PaletteLabel newPalette(String refNo) {
//         String suffix = String.format("%04X", index.getAndIncrement());
//         return new PaletteLabel("P-" + refNo + "-" + suffix, refNo);
//     }
// 
//     @Override
//     public PaletteLabel scanPalette(String label) {
//         String[] pieces = label.split("-");
//         if (!label.startsWith("P-")) {
//             throw new IllegalArgumentException("Label need to start with 'P-' characters, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         if (pieces.length != 3) {
//             throw new IllegalArgumentException("Label need to have two '-' characters, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         if (pieces[1].isEmpty()) {
//             throw new IllegalArgumentException("Label has empty refNo, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         if (pieces[2].isEmpty()) {
//             throw new IllegalArgumentException("Label has empty index, format: P-<refNo>-<index>, ex: P-900300-8A3");
//         }
//         return new PaletteLabel(label, pieces[1]);
//     }
// 
//     @Override
//     public BoxLabel scanBox(String label) {
//         String[] pieces = label.split("-");
//         if (!label.startsWith("B-")) {
//             throw new IllegalArgumentException("Label need to start with 'B-' characters, format: B-<refNo>-<quantity>-<boxType>, ex: B-900300-24-B");
//         }
//         if (pieces.length != 4) {
//             throw new IllegalArgumentException("Label need to have three '-' characters, format: B-<refNo>-<quantity>-<boxType>, ex: B-900300-24-B");
//         }
//         return new BoxLabel(pieces[1], Integer.valueOf(pieces[2]), pieces[3]);
//     }
// }
// 
// Path: warehouse-model/src/main/java/warehouse/locations/Location.java
// @Value
// public class Location {
//     private final String location;
// 
//     public static Location production() {
//         return new Location("production");
//     }
// 
//     public static Location quarantine() {
//         return new Location("quarantine");
//     }
// 
//     public static Location onTheMove(String user) {
//         return new Location("picked by " + user);
//     }
// 
//     public static Location unknown() {
//         return new Location("<unknown>");
//     }
// }


// Path: warehouse-model/src/test/java/warehouse/picklist/FifoPickingSteps.java
import cucumber.api.java.en.And;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import lombok.Data;
import org.assertj.core.api.Assertions;
import tools.FunkyDateHolder;
import warehouse.Labels;
import warehouse.PaletteLabel;
import warehouse.TLabelsFormats;
import warehouse.locations.Location;
import java.util.List;

package warehouse.picklist;



/**
 * Created by michal on 02.07.2016.
 */
public class FifoPickingSteps {

    private PickList pickList;

    @Data
    public static class StockEntry {
        private String refNo;