### Question:
BotStateTrajectorySync { public Optional<State> getState(final long timestamp, final double feedbackDelay) { long pastTimestamp = timestamp - (long) (feedbackDelay * 1e9); return buffer.get(pastTimestamp).map(p -> p.interpolate(pastTimestamp)); }  void add(final ITrajectory<IVector3> traj, final long timestamp); Optional<State> updateState(final long timestamp, final double feedbackDelay, final BotState state); TrajTrackingQuality getTrackingQuality(); Optional<State> getState(final long timestamp, final double feedbackDelay); void reset();  }### Answer:
@Test public void getState() { Optional<State> botState = updateState(Vector3.fromXY(1, 0), 1); assertThat(botState).isNotPresent(); botState = updateState(Vector3.fromXY(3, 0), 3); assertThat(botState).isPresent(); assertThat(botState.get().getPos()).isEqualTo(Vector2.fromXY(2, 0)); }