@Test public void testReset() throws Exception { List<Mutation> unorderedMutations = Lists.newArrayList(); when(firstMetadata.getId()).thenReturn(1L); when(secondMetadata.getId()).thenReturn(2L); MutationOrderValidator validator = new MutationOrderValidator(unorderedMutations::add); validator.validate(firstMutation); validator.validate(secondMutation); validator.reset(); validator.validate(firstMutation); validator.validate(secondMutation); assertTrue(unorderedMutations.isEmpty()); }
@Override public void reset() { lastSeenId.set(-1); }
MutationOrderValidator implements Validator<Mutation<?>> { @Override public void reset() { lastSeenId.set(-1); } }
MutationOrderValidator implements Validator<Mutation<?>> { @Override public void reset() { lastSeenId.set(-1); }  }
MutationOrderValidator implements Validator<Mutation<?>> { @Override public void reset() { lastSeenId.set(-1); }  @Override void validate(@NonNull final Mutation<?> mutation); @Override void reset(); }
MutationOrderValidator implements Validator<Mutation<?>> { @Override public void reset() { lastSeenId.set(-1); }  @Override void validate(@NonNull final Mutation<?> mutation); @Override void reset();  }