public void ATC4477_AX2849DuplicateControlandArchivingBankStatementfile()
        {
            //Create Bank Statement file with invalid reference
            string filelocation;
            Random random = new Random();
            int randomNum;
            randomNum = random.Next(30000000, 39999999);
            string dateValue;

            dateValue = DateTime.Today.ToString("yyMMdd");
            string timeValue;
            timeValue = DateTime.Now.ToString("HHmm");
            filelocation = Utils.BAI2FileCreator.bAI2UnknownCreator(randomNum, "100", dateValue, timeValue);
            string fileName;
            fileName = filelocation.Substring(filelocation.Length - 35);

            Homepage homePage = new Homepage();
            homePage.ClickCompanyButton();

            SelectCompanyPage selectCompanyPage = new SelectCompanyPage();
            Table table = new Table(selectCompanyPage.GetCompanyListTable());
            table.ClickCellValue("Company", "RTB", "Company");
            selectCompanyPage.ClickOkButton();

            homePage.ClickHomeTab();
            homePage.ClickCashandBankManagementTab();
            homePage.ClickBankStatementsLink();

            homePage.ClickImportStatementButton();
            BAI2FileImportPage bai2FileImportPage = new BAI2FileImportPage();
            bai2FileImportPage.SetStatmentFormatText("CBA BAI2");
            bai2FileImportPage.SetImportFileFolderCheckBox(false);
            bai2FileImportPage.SetFileNamelocationText(filelocation);
            bai2FileImportPage.SetReconcileImportCheckBox(true);
            bai2FileImportPage.ClickOKButton();

            InfoLogPage infoLogPage = new InfoLogPage();
            string bvdTreeItem = infoLogPage.GetTreeItemName("Journal BDV", "Posting");
            string BVD = bvdTreeItem.Substring(8, 9);

            Assert.IsTrue(infoLogPage.GetTreeItemExists("1 files have been imported in total.", "Posting"));
            infoLogPage.ClickClearButton();
            infoLogPage.ClickCloseButton();

            filelocation = Utils.BAI2FileCreator.bAI2UnknownCreator(randomNum, "100", dateValue, timeValue);

            homePage.ClickImportStatementButton();
            bai2FileImportPage = new BAI2FileImportPage();
            bai2FileImportPage.SetStatmentFormatText("CBA BAI2");
            bai2FileImportPage.SetImportFileFolderCheckBox(false);
            bai2FileImportPage.SetFileNamelocationText(filelocation);
            bai2FileImportPage.SetReconcileImportCheckBox(true);
            bai2FileImportPage.ClickOKButton();

            //Need to get message of duplicate error
            infoLogPage = new InfoLogPage();
            string DuplicateMessageTreeItem;
            DuplicateMessageTreeItem = infoLogPage.GetTreeItemName("Duplicate file", "Message (");
            string ErrorMessageTreeItem;
            ErrorMessageTreeItem = infoLogPage.GetTreeItemName("Error importing bank statement file ", "Message (");
            StringAssert.Contains(ErrorMessageTreeItem, fileName);
            infoLogPage.ClickClearButton();
            infoLogPage.ClickCloseButton();

            homePage.ClickBackNavButton();
            homePage.ClickHomeTab();
            homePage.ClickCashandBankManagementTab();
            homePage.ClickBankStatementFileImportExceptionLink();

            BSFileImportExceptionPage bsFileImportExceptionPage = new BSFileImportExceptionPage();
            table = new Table(bsFileImportExceptionPage.GetBSFileTable());
            table.FilterCellValue("File name");
            bsFileImportExceptionPage.ClickFilterMenuItem();
            FilterPage filterPage = new FilterPage();
            filterPage.SetFilterText("File name", "*" + fileName);
            filterPage.ClickOkButton();
            StringAssert.Contains(filelocation, table.GetCellContainsValue("File name", fileName, "File name"));
            bsFileImportExceptionPage.ClickShowLogButton();

            //Need to get message of duplicate error
            infoLogPage = new InfoLogPage();
            DuplicateMessageTreeItem = infoLogPage.GetTreeItemName("Duplicate file", "Message (");
            ErrorMessageTreeItem = infoLogPage.GetTreeItemName("Error importing bank statement file ", "Message (");
            StringAssert.Contains(ErrorMessageTreeItem, fileName);
            infoLogPage.ClickClearButton();
            infoLogPage.ClickCloseButton();
            bsFileImportExceptionPage.ClickCloseButton();
        }