TMDM-7671: fix by portial reverting TMDM-6868 fix and junit for 6868 (to be finished)