FilterFunction_max_3 max_3 = (FilterFunction_max_3) ff.function("max_3",
new org.opengis.filter.expression.Expression[2]);
assertEquals("Name is, ", "max_3", max_3.getName());
assertEquals("Number of arguments, ", 2, max_3.getFunctionName().getArgumentCount());
Function max_3Function = ff.function("max_3", literal_1, literal_m1);
assertEquals("max_3 of (1.0,-1.0):", (float) Math.max(1.0, -1.0),
((Float) max_3Function.evaluate(null)).floatValue(), 0.00001);
max_3Function = ff.function("max_3", literal_m1, literal_2);
assertEquals("max_3 of (-1.0,2.0):", (float) Math.max(-1.0, 2.0),
((Float) max_3Function.evaluate(null)).floatValue(), 0.00001);
max_3Function = ff.function("max_3", literal_2, literal_m2);
assertEquals("max_3 of (2.0,-2.0):", (float) Math.max(2.0, -2.0),
((Float) max_3Function.evaluate(null)).floatValue(), 0.00001);
max_3Function = ff.function("max_3", literal_m2, literal_pi);
assertEquals("max_3 of (-2.0,3.141592653589793):", (float) Math.max(
-2.0, 3.141592653589793), ((Float) max_3Function
.evaluate(null)).floatValue(), 0.00001);
max_3Function = ff.function("max_3", literal_pi, literal_05pi);
assertEquals("max_3 of (3.141592653589793,1.5707963267948966):",
(float) Math.max(3.141592653589793, 1.5707963267948966),
((Float) max_3Function.evaluate(null)).floatValue(), 0.00001);
max_3Function = ff.function("max_3", literal_05pi, literal_1);
assertEquals("max_3 of (1.5707963267948966,1.0):", (float) Math.max(
1.5707963267948966, 1.0), ((Float) max_3Function
.evaluate(null)).floatValue(), 0.00001);
} catch (FactoryRegistryException e) {
e.printStackTrace();
fail("Unexpected exception: " + e.getMessage());
}