TEST_F(PrinterTargetsTest, PrinterTargets_ProcessLoad_DefualtValues_PrinterTargetPage)
    {
        std::unique_ptr<PrinterTargets> pTarget = std::make_unique<PrinterTargets>();
        DFICommunicatorStub DfiCommunicator     = {};
        GenericDataModel m_GenericData          = {};
        ElementArray inputControls              = {};
        ElementArray outputControls             = {};
        Byte* outputMessage                     = nullptr;
        int outputSize                          = 0;
        co_featuretoggle_var.rv                 = FALSE;

        DfiCommunicator.SetMsgQueueNames("PrinterTargets_ProcessLoad_DefualtValues_PrinterTargetPageSR", "PrinterTargets_ProcessLoad_DefualtValues_PrinterTargetPageFS");
        DfiCommunicator.Initialize();
        DfiCommunicator.SetPrinterTypesTestData();

        // Printer Targets
        m_GenericData.SetIstLevel(0);
        m_GenericData.SetMessageType(static_cast<MessageType>(ToolsIDDefinitions::PrinterTargets));

        // check for OprnLoad
        m_GenericData.SetOperationType(OprnLoad);
        void* pMsg           = nullptr;
        unsigned int msgSize = 0u;
        Serializer::Serialize( m_GenericData, pMsg, msgSize );

        pTarget->Initialize("PrinterTargets_ProcessLoad_DefualtValues_PrinterTargetPageSR","PrinterTargets_ProcessLoad_DefualtValues_PrinterTargetPageFS");
        // get the availablity of the tool
        ASSERT_EQ(ToolState::ToolVisible,pTarget->GetAvailability());
        ASSERT_EQ(true, pTarget->Process((const Byte*)pMsg,msgSize,outputMessage,outputSize)) << "PrinterTarget - OprnLoad ::Process has failed";
        ASSERT_EQ(true,Serializer::Deserialize(outputMessage,outputSize,m_GenericData));

        //Check for Controls and labels and defualt values
        m_GenericData.GetUIElements(outputControls);
        ASSERT_EQ(outputControls.GetCount(),11); //Number of controls in the tool
        

        ControlElement control = {};
        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_MESSAGE, control))       << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_MESSAGE        <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_MESSAGE.c_str(), control.label.c_str());

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_LIST, control))          << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_LIST          <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_TARGET_LIST.c_str(), control.label.c_str());

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_NAME, control))          << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_NAME          <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_NAME.c_str(), control.label.c_str());
        ASSERT_STREQ(L"No Name<1>",                   control.value.c_str());
        ASSERT_TRUE(                                  control.validationRequired);
        ASSERT_TRUE(                                  control.valParameters.validateEmpty);
        ASSERT_STREQ(L"1;25",                         control.valParameters.range.c_str());
        ASSERT_EQ(DataType::AlphanumericString,       control.dataType);

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_TYPE, control))          << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_TYPE          <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_TYPE.c_str(), control.label.c_str());
        ASSERT_STREQ(L"None",                         control.value.c_str());

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_ORDER_IN_LIST, control)) << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_ORDER_IN_LIST <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_ORDER_IN_LIST.c_str(), control.label.c_str());
        ASSERT_STREQ(L"1",                                     control.value.c_str());

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_ENABLE, control))        << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_ENABLE        <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_ENABLE.c_str(), control.label.c_str()); 
        ASSERT_STREQ(L"1",                              control.value.c_str()); //0 = Yes, 1 = No

        ASSERT_EQ(false, outputControls.GetControlByID(PRINTER_TARGET_AUTHENTICATION_ENCRYPTION, control)) << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_AUTHENTICATION_ENCRYPTION << " control is missing";
       /* ASSERT_STREQ(PRINTER_TARGET_LBL_AUTHENTICATION_ENCRYPTION.c_str(), control.label.c_str());
        ASSERT_STREQ(L"Off", control.value.c_str());
        ASSERT_EQ(DataType::StringType, control.dataType);*/

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_AE_TITLE, control))      << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_AE_TITLE      <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_AE_TITLE.c_str(), control.label.c_str());
        ASSERT_STREQ(L"No Name",                          control.value.c_str());
        ASSERT_TRUE(                                      control.validationRequired);
        ASSERT_TRUE(                                      control.valParameters.validateEmpty);
        ASSERT_STREQ(L"1;16",                             control.valParameters.range.c_str());
        ASSERT_EQ(DataType::DicomAEString,                control.dataType);

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_IP_ADDRESS, control))    << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_IP_ADDRESS    <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_IP_ADDRESS.c_str(), control.label.c_str());
        ASSERT_STREQ(L"",                                   control.value.c_str());
        ASSERT_FALSE(                                       control.validationRequired);
        ASSERT_EQ(DataType::IpAddress,                      control.dataType);

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_PORT_NUMBER, control))   << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_PORT_NUMBER   <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_PORT_NUMBER.c_str(), control.label.c_str());
        ASSERT_STREQ(L"104",                                 control.value.c_str());
        ASSERT_TRUE(                                         control.validationRequired);
        ASSERT_TRUE(                                         control.valParameters.validateEmpty);
        ASSERT_STREQ(L"1;65535",                             control.valParameters.range.c_str());
        ASSERT_EQ(DataType::IntegerType,                     control.dataType);

        ASSERT_EQ(true, outputControls.GetControlByID(PRINTER_TARGET_PRINTER_TYPE, control))  << "PrinterTarget - OprnLoad :: " << PRINTER_TARGET_PRINTER_TYPE  <<" control is missing";
        ASSERT_STREQ(PRINTER_TARGET_LBL_PRINTER_TYPE.c_str(), control.label.c_str());
        ASSERT_STREQ(L"None",                                 control.value.c_str());

        Sleep(10);
        DfiCommunicator.Destroy();
        pTarget->Destroy();
        pTarget.reset(nullptr);
    } void PrinterTargets::PopulateUIElements(const int TargetIndex, ElementArray &controls)
    {
        controls.Clear();
        ControlElement control;
        BOOLEAN isIPv6Enabled = CoFeatureAvailability(CO_FEATURE_IPV6);

        control.label     = BackendToolsLabelID::PRINTER_TARGET_LBL_MESSAGE;
        control.controlID = BackendToolsControlsID::PRINTER_TARGET_MESSAGE;
        control.type      = TextArea;
        control.group     = Reference;
        control.dataType  = StringType;
        control.state     = Visible;
        control.contents.clear();
        controls.Add(control);

        control.Clear();
        control.label     = BackendToolsLabelID::PRINTER_TARGET_LBL_TARGET_LIST;
        control.controlID = BackendToolsControlsID::PRINTER_TARGET_LIST;
        control.type      = isIPv6Enabled ? ComboBoxWider : ComboBox;
        control.group     = Reference;
        control.dataType  = StringType;
        control.state     = Visible;
        control.value     = std::wstring(PrintTargetsList[TargetIndex].target.name);
        GetTargetNames(control.contents);
        control.notifyChange = true;
        controls.Add(control);
        m_PrintDataModel.SetChangedControl(control);

        control.Clear();
        control.label                       = BackendToolsLabelID::PRINTER_TARGET_LBL_NAME;
        control.controlID                   = BackendToolsControlsID::PRINTER_TARGET_NAME;
        control.type                        = isIPv6Enabled ? TextBoxWider : TextBox;
        control.group                       = Settings;
        control.dataType                    = StringType;
        control.state                       = Visible;
        control.value                       = std::wstring(PrintTargetsList[TargetIndex].target.name);
        control.validationRequired          = true;
        control.valParameters.validateEmpty = true;
        control.valParameters.range         = L"1;25";
        control.dataType                    = AlphanumericString;
        controls.Add(control);

        control.Clear();
        control.valParameters.excludeChars.clear();
        control.valParameters.Clear();
        control.label              = BackendToolsLabelID::PRINTER_TARGET_LBL_TYPE;
        control.controlID          = BackendToolsControlsID::PRINTER_TARGET_TYPE;
        control.type               = isIPv6Enabled ? ComboBoxWider : ComboBox;
        control.group              = Settings;
        control.state              = Visible;
        control.validationRequired = false;
        control.notifyChange       = false;
        control.value              = GetTargetTypeName(PrintTargetsList[TargetIndex].target.type);
        control.contents.clear();
        control.contents           = L"None;Print";
        controls.Add(control);

        control.Clear();
        control.label                       = BackendToolsLabelID::PRINTER_TARGET_LBL_ORDER_IN_LIST;
        control.controlID                   = BackendToolsControlsID::PRINTER_TARGET_ORDER_IN_LIST;
        control.type                        = isIPv6Enabled ? TextBoxWider : TextBox;
        control.group                       = Settings;
        control.dataType                    = IntegerType;
        control.state                       = Visible;
        control.validationRequired          = true;
        control.valParameters.validateEmpty = true;
        control.value                       = std::to_wstring( PrintTargetsList[TargetIndex].order );
        control.valParameters.range         = L"1;25";
        control.contents.clear();
        controls.Add(control);

        control.Clear();
        control.contents.clear();
        control.label     = BackendToolsLabelID::PRINTER_TARGET_LBL_ENABLE;
        control.controlID = BackendToolsControlsID::PRINTER_TARGET_ENABLE;
        control.type      = RadioButton;
        control.group     = Settings;
        control.dataType  = IntegerType;
        control.state     = Visible;
        control.contents  = L"Yes;No";
        control.value     = std::to_wstring(static_cast<int>(FSInfra::BackendUtility::RadioButtonStatusToClient(static_cast<int>(PrintTargetsList[TargetIndex].target.enable))));
        controls.Add(control);

        if (TRUE == CoFeatureAvailability(CO_FEATURE_SECURE_COMMUNICATION))
        {
            control.Clear();
            control.contents.clear();
            control.label = BackendToolsLabelID::PRINTER_TARGET_LBL_AUTHENTICATION_ENCRYPTION;
            control.controlID = BackendToolsControlsID::PRINTER_TARGET_AUTHENTICATION_ENCRYPTION;
            control.type = ComboBox;
            control.group = Settings;
            control.dataType = StringType;
            control.state = Visible;
            control.contents += ComboBoxEntries[0].description + L";" + ComboBoxEntries[1].description + L";" + ComboBoxEntries[2].description;
            control.value = GetComboValue(PrintTargetsList[TargetIndex].target);
            controls.Add(control);
        }

        control.Clear();
        control.label                       = BackendToolsLabelID::PRINTER_TARGET_LBL_AE_TITLE;
        control.controlID                   = BackendToolsControlsID::PRINTER_TARGET_AE_TITLE;
        control.type                        = isIPv6Enabled ? TextBoxWider : TextBox;
        control.group                       = Settings;
        control.dataType                    = StringType;
        control.state                       = Visible;
        control.validationRequired          = true;
        control.valParameters.validateEmpty = true;
        control.valParameters.range         = L"1;16";
        control.validationRequired          = true;
        control.value                       = CommonUtility::ConvertToWstring(PrintTargetsList[TargetIndex].target.aeTitle);
        control.dataType                    = DicomAEString;
        controls.Add(control);

        control.Clear();
        control.valParameters.excludeChars.clear();
        control.valParameters.Clear();
        if (isIPv6Enabled)
        {
            control.label                       = BackendToolsLabelID::PRINTER_TARGET_LBL_HOST_ADDRESS;
            control.validationRequired          = true;
            control.valParameters.validateEmpty = true;
            control.valParameters.range         = L"1;39";
            control.dataType                    = AlphanumericString;
        }
        else
        {
            control.label                     = BackendToolsLabelID::PRINTER_TARGET_LBL_IP_ADDRESS;
            control.customUserGuidanceMessage = BackendMessage::IPAddressCustomMessage;
            control.validationRequired        = false;
            control.dataType                  = IpAddress;
        }
        control.controlID          = BackendToolsControlsID::PRINTER_TARGET_IP_ADDRESS;
        control.type               = isIPv6Enabled ? TextBoxWider : TextBox;
        control.group              = Settings;
        control.state              = Visible;
        control.value              = CommonUtility::ConvertToWstring(PrintTargetsList[TargetIndex].target.ipAddress);
        controls.Add(control);

        control.Clear();
        control.label                       = BackendToolsLabelID::PRINTER_TARGET_LBL_PORT_NUMBER;
        control.controlID                   = BackendToolsControlsID::PRINTER_TARGET_PORT_NUMBER;
        control.type                        = isIPv6Enabled ? TextBoxWider : TextBox;
        control.group                       = Settings;
        control.dataType                    = IntegerType;
        control.state                       = Visible;
        control.validationRequired          = true;
        control.valParameters.validateEmpty = true;
        control.valParameters.range         = L"1;65535";
        control.value                       = std::to_wstring(PrintTargetsList[TargetIndex].target.portNumber);
        controls.Add(control);

        control.Clear();
        control.label     = BackendToolsLabelID::PRINTER_TARGET_LBL_PRINTER_TYPE;
        control.controlID = BackendToolsControlsID::PRINTER_TARGET_PRINTER_TYPE;
        control.type      = isIPv6Enabled ? ComboBoxWider : ComboBox;
        control.group     = Settings;
        control.state     = Visible;
        if( PrintTargetsList[TargetIndex].target.print.selectedPrntype == PRNTYPE_NONE)
        {
            control.value = L"None";
        }
        else
        {
            control.value =  CommonUtility::ConvertToWstring(m_PrintDefinition.prnTypeInstance[PrintTargetsList[TargetIndex].target.print.selectedPrntype].name);
        }
        GetPrintTypes(control.contents);
        control.notifyChange = true;
        controls.Add(control);
    } here ASSERT_EQ(outputControls.GetCount(), 11); //Number of controls in the tool actual value is coming 10 why?