@Test
    void verifyOperation() {
        val service = mock(RegisteredService.class);
        when(service.getId()).thenReturn(1000L);
        when(service.getName()).thenReturn("Test");

        val strategy = new DefaultRegisteredServiceResourceNamingStrategy();
        val pattern = strategy.buildNamingPattern("json", "xml", "xyz");
        assertNotNull(pattern);
        val result = strategy.build(service, "json");
        assertNotNull(result);
        assertEquals("Test-1000.json", result);
        verifyFileNamePattern(pattern, "Test-1000.json");
        verifyFileNamePattern(pattern, "Test-1000.json");
        verifyFileNamePattern(pattern, "Test-Example-1000.json");
        verifyFileNamePattern(pattern, "Multiple-Test-Example-1.xml");
    }
This is {@link DefaultRegisteredServiceResourceNamingStrategyTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-services-registry/src/test/java/org/apereo/cas/services/resource/DefaultRegisteredServiceResourceNamingStrategyTests.java