You will create a JUnit test to verify the correctness of the Event Reservation System.
This
includes testing the following methods:
• checkBookingCode(String code)
• checkPasswordComplexity(String password)
• makeReservation(String bookingCode, String password)
Requirements:
1. Test Cases for checkBookingCode(String code):
o Test valid booking codes (e.g., "Event_123") and ensure the method returns true.
o Test invalid booking codes that:
▪ Do not contain an underscore (_).
▪ Exceed 12 characters.
2. Test Cases for checkPasswordComplexity(String password):
o Test valid passwords (e.g., "Password1@") and ensure the method returns true.
o Test invalid passwords that:
▪ Are shorter than 8 characters.
▪ Do not contain an uppercase letter.
▪ Do not contain a number.
▪ Do not contain a special character.
3. Test Cases for makeReservation(String bookingCode, String password):
o Ensure it returns the correct messages based on valid and invalid booking codes
and passwords:
▪ "Booking code is incorrectly formatted."
▪ "Password does not meet the complexity requirements."
▪ "Reservation successfully made!"