Added GetMaxNum() method.

Added test cases for GetMaxNum() method.