### Question:
SpatialDimensionPF extends GenericGeometryPropertyFunction { @Override protected NodeValue applyPredicate(GeometryWrapper geometryWrapper) { Integer dimension = geometryWrapper.getSpatialDimension(); return NodeValue.makeNodeInteger(dimension); }    }### Answer:
@Test public void testApplyPredicate_2_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: SpatialDimensionPF instance = new SpatialDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(2); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_3_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: SpatialDimensionPF instance = new SpatialDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(3); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_2M_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: SpatialDimensionPF instance = new SpatialDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(2); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }
@Test public void testApplyPredicate_3M_Dimension() { GeometryWrapper geometryWrapper = GeometryWrapper.extract("<http: SpatialDimensionPF instance = new SpatialDimensionPF(); NodeValue expResult = NodeValue.makeNodeInteger(3); NodeValue result = instance.applyPredicate(geometryWrapper); assertEquals(expResult, result); }