Application runs in production environment and there is no change in code since long time.
After setting up application in eclipse in local machine, I am trying to run JUnits and they are failing due to resources file not found located in src/test/resources folder in Java maven project directory.
java.io.FileNotFoundException: File 'C:\[redacted]\target\test-classes\sample.txt' does not exist
In code, files are read through below code.
String content = IOUtils.toString(openInputStream(this.getClass().getClassLoader().getResource(filename).getPath()), "UTF-8")
NOTE: application has been set up before also without any issue of JUnits. application is passed through Jenkin build JUnit check also. I am able to run my application in eclipse.
So there should be something missing at eclipse setting or build path. Please guide me.