LPS-34313

Hey Sergio,

this is the pull request I mentioned to you. The code itself is a small helper method for the later data handler re-factor and it contains a test as well, but Mate will describe it in a more detailed way.

cc'-ing: @matethurzo

thanks,
Daniel