how can a re-write the method "setHateosLink" in order to remove side-effect? I need to call it from stream in "getCategories" method and inline from getCate