Separated convertProgress to add unit tests
Added unit tests to convertProgress