[CB-4373] Added tests for framework ref counting.