MDL-40572 badges: Move assertion library. Add unit test