td.modifiers().add(modifier);
td.setName(ast.newSimpleName("Company"));
EList<Operation> operations = mock(EList.class,
Answers.RETURNS_DEEP_STUBS.get());
Operation operation = mock(Operation.class,
Answers.RETURNS_DEEP_STUBS.get());
Type operationType = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());
Iterator<Operation> iteratorOperation = mock(Iterator.class);
EList<Type> raisedExceptions = mock(EList.class,
Answers.RETURNS_DEEP_STUBS.get());
Iterator<Type> iteratorException = mock(Iterator.class);
Type exceptionType = mock(Type.class, Answers.RETURNS_DEEP_STUBS.get());
when(clazz.getOperations()).thenReturn(operations);
when(operations.iterator()).thenReturn(iteratorOperation);
when(iteratorOperation.hasNext()).thenReturn(true, false);
when(iteratorOperation.next()).thenReturn(operation);
when(operation.getName()).thenReturn("calculateMe");
when(operation.getType()).thenReturn(operationType);
when(operation.getRaisedExceptions()).thenReturn(raisedExceptions);
when(raisedExceptions.iterator()).thenReturn(iteratorException);
when(iteratorException.hasNext()).thenReturn(true, false);
when(iteratorException.next()).thenReturn(exceptionType);
when(exceptionType.getQualifiedName()).thenReturn(