Refactoring mocker stream reader into generic commons utility class