EClass eClass = createMock(EClass.class);
expect(eClass.getEStructuralFeature("ref")).andReturn(feature);
LexerCommandExpr args = createMock(LexerCommandExpr.class);
expect(args.getRef()).andReturn(ref);
expect(args.eClass()).andReturn(eClass);
LexerCommand command = createMock(LexerCommand.class);
expect(command.getArgs()).andReturn(args);
expect(command.eContainer()).andReturn(rule);