Junilu Lacar wrote:It has to do with the package declarations and the classpath settings when you run your tests.
By convention, the package structure that you create under src/test mirrors the package structure under src/main. You also declare your *Test classes to be in the same package as the class under test. This way, you can even reference members in your production code that have package-private (default) access.
When running tests, the test class output directory is added to the classpath in addition to the production class output directory. As a result, even though the two may be entirely separate physical directories in the file system, to the Java Runtime as long as the classes are declared to be in the same package, they will be loaded and treated as being "together" in the same package.
For such application, I used to store such properties in user_home directory in a folder specific for my application.