TMDM-7590 : Changed delete records logic and added Junit test case