Add unit test for BATCH-1980
possible fix for BATCH-1980
add and fix unit tests related to BATCH-1980