fix NullPointerException in ITicketService and add TestCase

This fixes a NullPointerException when calling getTicket with a non-existing ticketId. Now it behaves like documented. I also added a test for this.