@Override
    public ModuleState build() {
        ModuleState result = new ModuleState(AUTH_MODULE);
        AuthConfigs authConfigs = ApplicationUtils.getBean(AuthConfigs.class);
        result.newState(AUTH_ENABLED, authConfigs.isAuthEnabled());
        result.newState(LOGIN_PAGE_ENABLED, isLoginPageEnabled(authConfigs));
        result.newState(AUTH_SYSTEM_TYPE, authConfigs.getNacosAuthSystemType());
        result.newState(AUTH_ADMIN_REQUEST, isAdminRequest(authConfigs));
        return result;
    }
@Test
    void testBuild() {
        when(authConfigs.getNacosAuthSystemType()).thenReturn("nacos");
        
        ModuleState actual = new AuthModuleStateBuilder().build();
        assertFalse((Boolean) actual.getStates().get(AUTH_ENABLED));
        assertFalse((Boolean) actual.getStates().get("login_page_enabled"));
        assertEquals("nacos", actual.getStates().get("auth_system_type"));
        assertTrue((Boolean) actual.getStates().get("auth_admin_request"));
    
        when(authConfigs.getNacosAuthSystemType()).thenReturn(MockAuthPluginServiceB.TEST_PLUGIN);
        ModuleState actual2 = new AuthModuleStateBuilder().build();
        assertTrue((Boolean) actual2.getStates().get("login_page_enabled"));
        assertEquals(MockAuthPluginServiceB.TEST_PLUGIN, actual2.getStates().get("auth_system_type"));
        assertFalse((Boolean) actual2.getStates().get("auth_admin_request"));
    }