I have a function that checks to see if a file exists or not. If it does exist, it proceeds to execute some code. It's this code that I need to test.
I cannot have an actual file in the test suite, so Im attempting to mock Files.exists()
to have it return true.
The function looks similar to this
protected function foo() {
Path jsonPath = getPath();
if (Files.exists(jsonPath)) {
// Code to test...
}
}