@Test
    void verifyDefault() {
        val repository = LockRepository.asDefault();
        val lockKey = UUID.randomUUID().toString();

        val container = new Container();
        container.values.put(lockKey, new ArrayList<>());

        val threads = new ArrayList<Thread>();
        IntStream.range(0, 10).forEach(i -> {
            val thread = new Thread(Unchecked.runnable(() -> {
                Thread.sleep(250);
                repository.execute(lockKey, () -> {
                    container.values.get(lockKey).add(UUID.randomUUID().toString());
                    return null;
                });
            }));
            thread.setName("Thread-" + i);
            threads.add(thread);
            thread.start();
        });
        for (val thread : threads) {
            try {
                thread.join();
            } catch (final InterruptedException e) {
                fail(e);
            }
        }
        assertEquals(10, container.values.get(lockKey).size());
    }
This is {@link DefaultLockRepositoryTests}.

@author Misagh Moayyed
@since 6.5.0
api/cas-server-core-api-util/src/test/java/org/apereo/cas/util/lock/DefaultLockRepositoryTests.java