@Override
 public void verifyAllFieldsAtProductInventoryPage(
     Product serialProduct,
     Product nonSerialProduct,
     String[] esnNumbers,
     Map<String[], String[]> productQuantityCountAndStatuses) {
   search.searchForProduct(
       ProductSearch.builder()
           .productName(serialProduct.getName().get())
           .active(true)
           .inActive(true)
           .create());
   session.click(FIRST_EDIT_PRODUCT_BTN);
   waits.waitUntilVisible(ProductLocators.TITLE_EDITING_PRODUCT_TYPE);
   verifyCommonFieldsAtProductInventory();
   waits.waitUntilVisible(productAtAllStores(serialProduct));
   Map<String[], String[]> productStatuses = productQuantityCountAndStatuses;
   for (Map.Entry<String[], String[]> entrySet : productStatuses.entrySet()) {
     String[] status = entrySet.getKey();
     String[] quantityCounts = entrySet.getValue();
     for (int i = 0; i < status.length; i++) {
       if (i == 0) {
         int j = Integer.parseInt(quantityCounts[i]) + 1;
         waits.waitUntilVisible(verifyQuantity(status[i], String.valueOf(j)));
       } else {
         waits.waitUntilVisible(verifyQuantity(status[i], quantityCounts[i]));
       }
     }
   }
   waits.waitUntilVisible(
       verifyQuantity(ProductStaticData.QUANTITY, String.valueOf(esnNumbers.length)));
   String newEsnLength = String.valueOf(esnNumbers.length - 1);
   waits.waitUntilVisible(verifyQuantity(ProductStaticData.AVAILABLE, newEsnLength));
   waits.waitUntilVisible(verifyQuantity(ProductStaticData.TRANSFER, "1"));
   // Verify for the non Serialized product.
   search.searchForProduct(
       ProductSearch.builder()
           .productName(nonSerialProduct.getName().get())
           .active(true)
           .inActive(true)
           .create());
   session.click(FIRST_EDIT_PRODUCT_BTN);
   waits.waitUntilVisible(ProductLocators.TITLE_EDITING_PRODUCT_TYPE);
   verifyCommonFieldsAtProductInventory();
   waits.waitUntilVisible(productAtAllStores(nonSerialProduct));
   Map<String[], String[]> productCountAndStatuses = productQuantityCountAndStatuses;
   for (Map.Entry<String[], String[]> entry : productCountAndStatuses.entrySet()) {
     String[] statuses = entry.getKey();
     String[] quantityCount = entry.getValue();
     for (int i = 0; i < statuses.length; i++) {
       waits.waitUntilVisible(verifyQuantity(statuses[i], quantityCount[i]));
     }
   }
 }
 @Test(
     groups = {"P1", "P1_Target", "Smoke_Target", "CycleCountStatusReport"},
     singleThreaded = true)
 public void createTestData() {
   productActions.createProduct(nonSerialProduct);
   List<String> barcodes = new ArrayList<String>();
   {
     barcodes.add(barcode[0]);
   }
   productUPCActions.addProductUPCWithoutVendor(nonSerialProduct.getName().get(), barcodes);
   receivingActions.createShipmentAddingManualNonSerProduct(
       nonSerialProduct.getName().get(), 10, 1.00);
   MerchantStore store =
       MerchantStore.builder().priceGroupText(SetupStaticData.STORE_PRICE_GROUP).create();
   merchantStoreActions.editMerchantStore(LoginData.STORE.value(), store);
 }
 @Override
 public void verifyPageNavigateToLocateProduct(Product product, String esnNumbers[]) {
   search.searchForProduct(
       ProductSearch.builder()
           .productName(product.getName().get())
           .active(true)
           .inActive(true)
           .create());
   session.click(FIRST_EDIT_PRODUCT_BTN);
   waits.waitUntilVisible(ProductLocators.TITLE_EDITING_PRODUCT_TYPE);
   session.click(PRODUCT_INVENTORY_TAB);
   waits.waitUntilVisible(TITLE_PRODUCT_INVENTORY);
   session.click(getEditButton(esnNumbers[0]));
   waits.waitUntilVisible(verifyEsnAtLocateProduct(esnNumbers[0]));
   if (session.existsNow(getDefaultPrice(product.getDefaultPrice().get()))) {
     waits.waitUntilVisible(getDefaultPrice(product.getDefaultPrice().get()));
   }
   waits.waitUntilVisible(verifyCategory(product.getCategoryText().get()));
   waits.waitUntilVisible(verifyShortDescription(product.getShortDescription().get()));
   waits.waitUntilVisible(verifyStoreName(LoginData.STORE.value()));
 }
 @Override
 public void viewEsnOfInactiveSerialProduct(Product serialProduct, String esnNumber) {
   search.searchForProduct(
       ProductSearch.builder()
           .productName(serialProduct.getName().get())
           .active(true)
           .inActive(true)
           .create());
   session.click(FIRST_EDIT_PRODUCT_BTN);
   waits.waitUntilVisible(ProductLocators.TITLE_EDITING_PRODUCT_TYPE);
   session.click(PRODUCT_INVENTORY_TAB);
   waits.waitUntilVisible(getEditButton(esnNumber));
   session.click(getEditButton(esnNumber));
   waits.waitUntilVisible(verifyEsnAtLocateProduct(esnNumber));
 }
 @Override
 public void verifyWarningMessageIsDisplayedWithUnprivilegedOfLocateProduct(
     Product product, String[] esnNumbers) {
   search.searchForProduct(
       ProductSearch.builder()
           .productName(product.getName().get())
           .active(true)
           .inActive(true)
           .create());
   session.click(FIRST_EDIT_PRODUCT_BTN);
   waits.waitUntilVisible(ProductLocators.TITLE_EDITING_PRODUCT_TYPE);
   session.click(PRODUCT_INVENTORY_TAB);
   waits.waitUntilVisible(TITLE_PRODUCT_INVENTORY);
   waits.waitUntilNotVisible(getEditButton(esnNumbers[0]));
 }
  @Test(
      groups = {"P1", "P1_Target", "Smoke_Target", "CycleCountStatusReport"},
      dependsOnMethods = "createTestData")
  public void viewCycleCountStatusReport() {
    String[] productUPC = barcode;

    CycleCounts cycleCounts =
        CycleCounts.builder()
            .cycleCountName(cycleCountName)
            .indexForSelect(1)
            .daysForCycleCount(0)
            .productUPC(productUPC)
            .nonSerializedProductName(nonSerialProduct.getName().get())
            .reason("Demo Phone")
            .reviewalCode("12345")
            .quantityCount(10)
            .create();
    cycleCountActions.createCycleCountForDifferentProducts(cycleCounts);
    cycleCountActions.startCycleCount(cycleCountName);
    InventoryManagement cycleCountStatusReport =
        InventoryManagement.builder()
            .storeName(StoreData.EXISTING_STORE_NAME)
            .cycleCountStatus("Pending Count")
            .cycleCountName(cycleCountName)
            .create();
    inventoryManagementActions.viewCycleCountStatusReport(
        daysForCycleCountStatus, cycleCountStatusReport);
    cycleCountActions.performCycleCount(cycleCounts);
    InventoryManagement cycleCountStatusReport1 =
        InventoryManagement.builder()
            .storeName(StoreData.EXISTING_STORE_NAME)
            .cycleCountStatus("Pending Review")
            .cycleCountName(cycleCountName)
            .create();
    inventoryManagementActions.viewCycleCountStatusReport(
        daysForCycleCountStatus, cycleCountStatusReport1);
    cycleCountActions.reviewSerializedNonSerializedProductCycleCount(cycleCounts);
    InventoryManagement cycleCountStatusReport2 =
        InventoryManagement.builder()
            .storeName(StoreData.EXISTING_STORE_NAME)
            .cycleCountStatus("Reviewed")
            .cycleCountName(cycleCountName)
            .create();
    inventoryManagementActions.viewCycleCountStatusReport(
        daysForCycleCountStatus, cycleCountStatusReport2);
  }