Moment-based tests for discrete distributions