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);
Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");
PowerMock.expectPrivate(validator, "warning",
"rule 'RULE' contains a lexer command with an unrecognized " +