Change getIsNewRecord logic. Add new tests.