I have a Java object called Parameter and I'm trying to mock it using groovy. Parameter is an abstract class with 1 abstract method. It also has a non-abstract method called getName(). I'm trying to mock it as follows in Groovy:
def p1 = [name:{"p1Name"}] as Parameter
But I get a runtime error because I don't implement the abstract method. If I'm trying to create a mock, why would I need to implement the abstract method?
thanks, Jeff