update test case to cover nil delegate