We have a URL object in one of our Java classes that we want to mock, but it\'s a final class so we cannot. We do not want to go a level above, and mock the InputStream beca
Create a URL-object pointing to the test class itself.
final URL url = new URL("file://" + getClass().getProtectionDomain().getCodeSource().getLocation().getPath());