@Test
    void verifyBadClass() {
        assertThrows(NullPointerException.class, () -> ticketSerializationManager.serializeTicket(mock(Ticket.class)));
        assertThrows(InvalidTicketException.class, () -> ticketSerializationManager.deserializeTicket(StringUtils.EMPTY, StringUtils.EMPTY));
        assertThrows(IllegalArgumentException.class, () -> ticketSerializationManager.deserializeTicket(StringUtils.EMPTY, "something"));
        assertThrows(NullPointerException.class, () -> ticketSerializationManager.deserializeTicket(StringUtils.EMPTY, mock(Ticket.class).getClass()));
    }
This is {@link DefaultTicketStringSerializationManagerTests}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-tickets/src/test/java/org/apereo/cas/ticket/serialization/DefaultTicketStringSerializationManagerTests.java