The equals method of
mockmaker.structure.SourceMethodStructure explicitly
casts the (Object) parameter to SourceMethodStructure.
This used to throw a ClassCastException when making
the mock of a class (not an interface, in which case it
works fine) using its source file (not the .class file, when
mock maker uses reflection, and works fine).
This patch just asks whether the parameter to the
equals method is an instance of SourceMethodStructure
before the cast.
CAUTION: this might not be the correct solution; maybe
there are other ways to test for equality between a
SourceMethodStructure and a
ReflectionMethodStructure (the actual class of the
parameter passed in the scenario described above). But
it worked for me.