Add test of diag. Ref: #7181