@RepeatedTest(1)
    void verifyFailures() throws Throwable {
        val pool = mock(ObjectPool.class);
        val registry = new MemcachedTicketRegistry(CipherExecutor.noOp(), ticketSerializationManager, ticketCatalog, applicationContext, pool);
        assertNotNull(registry.updateTicket(new MockTicketGrantingTicket("casuser")));
        assertTrue(registry.deleteSingleTicket(new MockTicketGrantingTicket("casuser")) > 0);
        assertDoesNotThrow(() -> {
            val client = mock(MemcachedClientIF.class);
            when(pool.borrowObject()).thenReturn(client);
            when(client.set(anyString(), anyInt(), any())).thenThrow(new IllegalArgumentException());
            doThrow(new IllegalArgumentException()).when(pool).returnObject(any());
            registry.addTicket(new MockTicketGrantingTicket("casuser"));
        });
    }
Unit test for MemcachedTicketRegistry class.

@author Middleware Services
@since 3.0.0
@deprecated Since 7.0.0
support/cas-server-support-memcached-ticket-registry/src/test/java/org/apereo/cas/ticket/registry/MemcachedTicketRegistryTests.java