I want to mock function like Files.copy(), LocalDate.now() from Java e.g. In one of my function I have
public int functionForTest(){
var now = LocalDate.now()
if(now.getMonth() == 2)
return 55;
if(now.getMonth() == 4)
return 22;
}
and based on current month I have to return some value but when I want to test this function I have to mock LocalDate.now(). Does someone know how to mock this function?