EClass eClass = createMock(EClass.class);
EStructuralFeature feature = createMock(EStructuralFeature.class);
Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");
expect(option.getName()).andReturn("Some");
expect(option.eClass()).andReturn(eClass);
expect(eClass.getEStructuralFeature("name")).andReturn(feature);
PowerMock.expectPrivate(validator, "warning", "unsupported option 'Some'",
option, feature);