You wrote
... but since I use it from different projects the path is not correct - it is relative to current project that is being built/tested, not the one where utility class and resources are ...
Relative paths are not the problem here. You use an absolute path in your example, but even if you would use a relative one, this would refer to the package or directory structure. getResourceAsStream
would pick them up as long as the classpath is correct. The real problem is that you are referring to test resources in another project. But test resources and classes are not contained in the project artifact, so they are not accessible from modules that include this as a dependency. If you need these resources for tests in several projects, I would suggest that you create a new project (let's say "projectxyz-testresources") with these resouces contained in src/main/resources
and add this as a dependency with scope "test" where relevant.
EDITED TO ADD:
If you don't want to use a separate project for test resources, you can create a test-jar containing test classes and resources using goal jar:test-jar
and include this as a test dependency. You may want to configure the jar plugin in your pom to execute this goal on regular builds.