You may find reusable function and sample test published here:

 

https://github.com/Inflectra/rapise-powerpack/tree/master/ReadPropertiesFile