Heyho!
betterString(test3, test4, (test3, test4) -> true);//compiles
This works because you pass the betterString method the static variables test3 and test4, and then you pass two locally created variables, that are named exactly the same as your static variables.
If you remember constructors:
We had to use the
this keyword because the local variable names are referenced by default in case of conflict. Something similar happens in your example.
test1 and test2 are local, but test3 and test4 are class variables.
Lambdas always redeclare the parameters you give them in the parantheses. Writing (test1, test2) is just a convenience for shortly writing (String test1, String test2).