@@ -15,29 +15,35 @@ public class StoreFileReader {
     public static final String PRODUCTS_DATA = "src/main/resources/products.md";
     public static final String PROMOTIONS_DATA = "src/main/resources/promotions.md";
 
-    public Map<String, Product> product(Map<String, Promotion> promotions) {
-        Map<String, Product> products = new LinkedHashMap<>();
-        try (BufferedReader br = new BufferedReader(
-                new InputStreamReader(new FileInputStream(PRODUCTS_DATA)))) {
-            String line = br.readLine();
-            while ((line = br.readLine()) != null) {
-                String[] product = line.split(",");
-                String productName = product[0];
-                if (products.containsKey(productName)) { // 두번째로 들어오는 건 무조건 일반 재고
-                    Product p = products.get(productName);
-                    int quantity = Integer.parseInt(product[2]);
-                    p.add(quantity);
-                }
-                products.computeIfAbsent(productName, (k) -> convertProduct(product, promotions));
-
-            }
+    public static Map<String, Product> product(Map<String, Promotion> promotions) {
+        try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(PRODUCTS_DATA)))) {
+            return getProductMap(promotions, br);
         } catch (IOException e) {
             throw new RuntimeException("Failed to read the file.", e);
         }
+    }
+
+    private static Map<String, Product> getProductMap(Map<String, Promotion> promotions, BufferedReader br)
+            throws IOException {
+        Map<String, Product> products = new LinkedHashMap<>();
+        String line = br.readLine();
+        while ((line = br.readLine()) != null) {
+            String[] product = line.split(",");
+            String productName = product[0];
+            addProduct(products, productName, product);
+            products.computeIfAbsent(productName, (k) -> convertProduct(product, promotions));
+        }
         return products;
     }
 
-    private Product convertProduct(String[] product, Map<String, Promotion> promotions) {
+    private static void addProduct(Map<String, Product> products, String productName, String[] product) {
+        if (products.containsKey(productName)) {
+            Product p = products.get(productName);
+            p.add(Integer.parseInt(product[2]));
+        }
+    }
+
+    private static Product convertProduct(String[] product, Map<String, Promotion> promotions) {
         String name = product[0];
         int price = Integer.parseInt(product[1]);
         int quantity = Integer.parseInt(product[2]);
@@ -52,23 +58,28 @@ private static boolean isPromotion(String[] product) {
         return !product[3].equals("null");
     }
 
-    public Map<String, Promotion> promotions() {
-        Map<String, Promotion> promotions = new LinkedHashMap<>();
+    public static Map<String, Promotion> promotions() {
         try (BufferedReader br = new BufferedReader(
                 new InputStreamReader(new FileInputStream(PROMOTIONS_DATA)))) {
-            String line = br.readLine();
-            while ((line = br.readLine()) != null) {
-                String[] promotion = line.split(",");
-                String promotionName = promotion[0];
-                promotions.put(promotionName, convertPromotion(promotion));
-            }
+            return getPromotionMap(br);
         } catch (IOException e) {
             throw new RuntimeException("Failed to read the file.", e);
         }
+
+    }
+
+    private static Map<String, Promotion> getPromotionMap(BufferedReader br) throws IOException {
+        Map<String, Promotion> promotions = new LinkedHashMap<>();
+        String line = br.readLine();
+        while ((line = br.readLine()) != null) {
+            String[] promotion = line.split(",");
+            String promotionName = promotion[0];
+            promotions.put(promotionName, convertPromotion(promotion));
+        }
         return promotions;
     }
 
-    private Promotion convertPromotion(String[] promotion) {
+    private static Promotion convertPromotion(String[] promotion) {
         return new Promotion(promotion[0], Integer.parseInt(promotion[1]), Integer.parseInt(promotion[2]),
                 LocalDate.parse(promotion[3]), LocalDate.parse(promotion[4]));
     }

리뷰: 에러 메세지를 상수화 시키는 것은 어떨까요? 아니면 커스텀 예외도 좋을 것 같습니다.