public class SeatReservationTest {
public static void main(String[] args) throws Exception {
SeatReservationSystem system = new InMemorySeatReservationSystem(3000);
String holdId = system.holdSeat("A1", "user1");
assert holdId != null;
assert system.confirmSeat(holdId);
// Cannot double book
assert system.holdSeat("A1", "user2") == null;
// Expiry test
String hold2 = system.holdSeat("A2", "user2");
Thread.sleep(3100);
assert !system.confirmSeat(hold2);
// Seat should be available again
String hold3 = system.holdSeat("A2", "user3");
assert hold3 != null;
System.out.println("✅ SeatReservation tests passed");
}
}