TransformStreams { public List<OrderLine> p10_readOrderFromFile(File file) throws IOException { Stream<String> lines = null; return null; }  List<OrderDto> p01_toDtos(List<Order> orders); Set<PaymentMethod> p02_getUsedPaymentMethods(Customer customer); SortedSet<LocalDate> p03_getOrderDatesAscending(Customer customer); Map<Long, Order> p04_mapOrdersById(Customer customer); Map<PaymentMethod, List<Order>> p05_getProductsByPaymentMethod(Customer customer); Map<Product, Long> p06_getProductCount(Customer customer); List<Product> p07_getAllOrderedProducts(Customer customer); String p08_getProductsJoined(Customer customer); Long p09_getApproximateTotalOrdersPrice(Customer customer); List<OrderLine> p10_readOrderFromFile(File file);  }
@Test public void p10_readOrderFromFile() throws IOException { List<OrderLine> orderLines = service.p10_readOrderFromFile(new File("test.ok.txt")); assertEquals("Chair", orderLines.get(0).getProduct().getName()); assertEquals(2, orderLines.get(0).getCount()); assertEquals("Table", orderLines.get(1).getProduct().getName()); assertEquals(1, orderLines.get(1).getCount()); }
@Test(expected = IllegalArgumentException.class) public void p10_readOrderFromFile_throws() throws IOException { service.p10_readOrderFromFile(new File("test.invalid.txt")); }