test generateMaxValue method