Verification of an electro-hydraulic system of a working machine is carried out by hardware in loop (HIL) simulation using multi-body-dynamics-based software by MeVea Oy as a real time simulator of the mechanical parts and electrical drives as hardware-in-loop components. Comparing analysis and verification of the HIL model with practical results are also performed for an axial piston hydraulic machine drive. The purpose is to demonstrate the possibility to test the drive with hydraulic load which was emulated by an electric drive. This enables one to construct different system identification, parameter estimation, control tuning and state monitoring algorithms based on testing in real time simulation environment. Recommendations for improving the HIL-setup were created.