extract assert method