There are several answers to this.
The first answer is: What's the point of testing something if you cannot change it to fix any problems you find? Are you
really sure you cannot change the class, even to add an extra constructor which is never used by the "real" code, for example?
The second answer is that you can make Eclipse do this, but you will need to get fairly creative with classpath settings. The trick is to have two areas of your source code, one of which is in the classpath for the application code, and one of which is in the classpath for the tests.
I don't know how you build whatever is actually delivered, but if you use
Ant, then it is pretty easy to set different classpaths for different operations. If that is the case, then
you should be able to remove the "real" class from the Eclipse build path settings, so Eclipse (and thus the built-in JUnit) only "sees" your mock version.
The third answer is that the difficulty of this is a strong "code smell" that these classes need to be decoupled.