Operation operation = mock(Operation.class,
Answers.RETURNS_DEEP_STUBS.get());
EList<Parameter> parameters = mock(EList.class,
Answers.RETURNS_DEEP_STUBS.get());
Iterator<Parameter> paramIterator = mock(Iterator.class);
Parameter parameter = mock(Parameter.class,
Answers.RETURNS_DEEP_STUBS.get());
Type type = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());
when(operation.getOwnedParameters()).thenReturn(parameters);
when(parameters.iterator()).thenReturn(paramIterator);
when(paramIterator.hasNext()).thenReturn(true, false);
when(paramIterator.next()).thenReturn(parameter);
when(parameter.getDirection()).thenReturn(
ParameterDirectionKind.IN_LITERAL);
when(parameter.getType()).thenReturn(type);
when(parameter.getName()).thenReturn("person");
when(parameter.getUpper()).thenReturn(0);
when(type.getName()).thenReturn("Person<Integer>");
when(type.getQualifiedName())
.thenReturn("de.component.Person<Integer>");
interfaceGenerator.generateMethodParams(ast, td, operation, md);