@Test public void testResetIdempotency() { final StateLocalInputSUL<Character, Integer> mock = Mockito.spy(sul); Mockito.doAnswer(invocation -> Collections.singleton('a')).when(mock).currentlyEnabledInputs(); final SULSymbolQueryOracle<Character, Integer> oracle = new StateLocalInputSULSymbolQueryOracle<>(mock, example.getUndefinedOutput()); Mockito.verify(mock, Mockito.times(0)).pre(); Mockito.verify(mock, Mockito.times(0)).post(); Mockito.verify(mock, Mockito.times(0)).currentlyEnabledInputs(); oracle.reset(); oracle.reset(); oracle.reset(); Mockito.verify(mock, Mockito.times(0)).pre(); Mockito.verify(mock, Mockito.times(0)).post(); Mockito.verify(mock, Mockito.times(0)).currentlyEnabledInputs(); }
@Override public void reset() { super.reset(); this.fetchRequired = true; }
StateLocalInputSULSymbolQueryOracle extends SULSymbolQueryOracle<I, O> implements SymbolQueryOracle<I, O> { @Override public void reset() { super.reset(); this.fetchRequired = true; } }
StateLocalInputSULSymbolQueryOracle extends SULSymbolQueryOracle<I, O> implements SymbolQueryOracle<I, O> { @Override public void reset() { super.reset(); this.fetchRequired = true; } StateLocalInputSULSymbolQueryOracle(StateLocalInputSUL<I, O> sul, O undefinedOutput); }
StateLocalInputSULSymbolQueryOracle extends SULSymbolQueryOracle<I, O> implements SymbolQueryOracle<I, O> { @Override public void reset() { super.reset(); this.fetchRequired = true; } StateLocalInputSULSymbolQueryOracle(StateLocalInputSUL<I, O> sul, O undefinedOutput); @Override void reset(); }
StateLocalInputSULSymbolQueryOracle extends SULSymbolQueryOracle<I, O> implements SymbolQueryOracle<I, O> { @Override public void reset() { super.reset(); this.fetchRequired = true; } StateLocalInputSULSymbolQueryOracle(StateLocalInputSUL<I, O> sul, O undefinedOutput); @Override void reset();  }