[test] Adding test and fixing doc