@Test
    void verifyInvalidFileLoad() {
        val file = mock(File.class);
        when(file.canRead()).thenReturn(Boolean.FALSE);
        assertTrue(newServiceRegistry.load(file).isEmpty());

        when(file.exists()).thenReturn(Boolean.FALSE);
        assertTrue(newServiceRegistry.load(file).isEmpty());

        when(file.length()).thenReturn(0L);
        assertTrue(newServiceRegistry.load(file).isEmpty());

        when(file.getName()).thenReturn(".ignore");
        assertTrue(newServiceRegistry.load(file).isEmpty());

        when(file.getName()).thenReturn("file.ignore");
        assertTrue(newServiceRegistry.load(file).isEmpty());
    }
This is {@link BaseResourceBasedServiceRegistryTests}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-services/src/test/java/org/apereo/cas/services/BaseResourceBasedServiceRegistryTests.java