@Test public void testResetIdempotency() { final SUL<Character, Integer> mock = Mockito.spy(sul); final SULSymbolQueryOracle<Character, Integer> oracle = new SULSymbolQueryOracle<>(mock); Mockito.verify(mock, Mockito.times(0)).pre(); Mockito.verify(mock, Mockito.times(0)).post(); oracle.reset(); oracle.reset(); oracle.reset(); Mockito.verify(mock, Mockito.times(0)).pre(); Mockito.verify(mock, Mockito.times(0)).post(); }
@Override public void reset() { if (postRequired) { this.sul.post(); this.postRequired = false; } this.preRequired = true; }
SULSymbolQueryOracle implements SymbolQueryOracle<I, O> { @Override public void reset() { if (postRequired) { this.sul.post(); this.postRequired = false; } this.preRequired = true; } }
SULSymbolQueryOracle implements SymbolQueryOracle<I, O> { @Override public void reset() { if (postRequired) { this.sul.post(); this.postRequired = false; } this.preRequired = true; } SULSymbolQueryOracle(final SUL<I, O> sul); }
SULSymbolQueryOracle implements SymbolQueryOracle<I, O> { @Override public void reset() { if (postRequired) { this.sul.post(); this.postRequired = false; } this.preRequired = true; } SULSymbolQueryOracle(final SUL<I, O> sul); @Override O query(I i); @Override void reset(); }
SULSymbolQueryOracle implements SymbolQueryOracle<I, O> { @Override public void reset() { if (postRequired) { this.sul.post(); this.postRequired = false; } this.preRequired = true; } SULSymbolQueryOracle(final SUL<I, O> sul); @Override O query(I i); @Override void reset();  }