In this paper, an approach to incorporate a digital twin for legacy production systems is presented. Hardware-inthe-loop setups are routinely used by manufacturing companies to carry out virtual commissioning. However, manufacturing companies having online legacy production systems are still struggling to incorporate a digital twin due to the absence of verified and validated simulation models. Companies that use virtual commissioning as a part of their engineering tool chain, usually perform offline verification of the simulation model. This approach is typically based on visual inspection and is a tedious task as each aspect of the model has to be visually validated. For legacy systems, only assessing the behavior visually in the absence of updated documents can result in an incorrect simulation model, i.e. simulating incorrect behavior with respect to the specification. Due to this, such simulation models cannot be incorporated in the engineering tool chain, as the simulated results can lead to improper decisions and can even cause equipment damage. This paper presents a platform and an approach, based on model-based testing, that is a first step for manufacturing companies to incorporate a validated simulation model for existing online production systems that will serve as a digital twin.