public static String getUserId() {
        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        if (attributes != null) {
            HttpServletRequest request = attributes.getRequest();
            return request.getHeader(CommonConstants.USER_ID_HEADER);
        }
        return "";
    }
@Test
    public void testGetUserIdWhenNoRequestAvailable() {
        // Clear request attributes to simulate no request being available
        RequestContextHolder.setRequestAttributes(null);

        // Call the method under test
        String userId = HeaderUtil.getUserId();

        // Assert that an empty string is returned when no request is available
        assertEquals("", userId);
    }