### Question:
GyroErrorStrategy extends DefaultErrorStrategy { @Override protected void reportInputMismatch(Parser recognizer, InputMismatchException error) { recognizer.notifyErrorListeners( error.getOffendingToken(), "Expected " + error.getExpectedTokens().toString(recognizer.getVocabulary()), error); }   static final GyroErrorStrategy INSTANCE; }### Answer:
@Test void reportInputMismatch() { InputMismatchException error = mock(InputMismatchException.class); when(error.getOffendingToken()).thenReturn(token); when(error.getExpectedTokens()).thenReturn(set); when(set.toString(any(Vocabulary.class))).thenReturn("foo"); when(recognizer.getVocabulary()).thenReturn(mock(Vocabulary.class)); strategy.reportInputMismatch(recognizer, error); verify(recognizer).notifyErrorListeners(token, "Expected foo", error); }