MDL-39923 badges: Fix unit tests