test for max and enum