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 testGetUserIdFromHeader() {
        // Set up the expected user ID in the mock request object
        String expectedUserId = "12345";
        when(request.getHeader(CommonConstants.USER_ID_HEADER)).thenReturn(expectedUserId);

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

        // Assert the expected result
        assertEquals(expectedUserId, userId);
    }