### Question:
BotStateFromTrajectoryCalculator { public Optional<BotState> getLatestState(BotID botID) { return getStateBuffer(botID).getLatest().map(DataSync.DataStore::getData); }  Optional<BotState> getState(final RobotInfo robotInfo); void reset(BotID botID); Optional<BotState> getLatestState(BotID botID);  }### Answer:
@Test public void getLatestState() { updateState(Vector3.fromXY(1, 0), 1); updateState(Vector3.fromXY(1, 1), 2); updateState(Vector3.fromXY(1, 2), 3); updateState(Vector3.fromXY(1, 3), 5); Optional<BotState> botState = c.getLatestState(BotID.createBotId(0, ETeamColor.YELLOW)); assertThat(botState).isPresent(); assertThat(botState.get().getPos()).isEqualTo(Vector2.fromXY(1, 3)); }