Add test case for issue CDF-318