TRUNK-3654: Changed 999 to Maximum Integer, with two additional test cases

Changed 999 to Maximum Integer, with two additional test cases

https://tickets.openmrs.org/browse/TRUNK-3654