I deeply suspect that you are doing no checking about the names of files, except for reporting the error.  That is, you're checking compiled equivalence, not whether the file name is valid with respect to the class name, etc.  So having the wrong one is not an issue.  It's also not against the JLS, and some compilers (including javac) handle classes not being in the files named for them, so it just... wasn't an error. 

In this case, fixing this name was purely for documentation, since I knew what the error should have been, and realized the file was named incorrectly for where the error actually was.  Might be worth having a version of forSourceString that infers the file name, so there's less duplication, and less likelihood of error.  But it's a minor thing.