Fixing unit test behavior