BNSF Railway interview question

API endpoint and handler functions in Java