HH-44533 move json asserts and fix tests