improve context pointer unittest