### Question:
TriangleScalableGeometry extends AbstractScalableMeshGeometry { @Override public TriangleScalableGeometry derive(BaseRenderProperties renderProperties, Constraints constraints) throws ClassCastException { return new TriangleScalableGeometry(createBuilder(), (ScalableMeshRenderProperties)renderProperties, constraints); } TriangleScalableGeometry(AbstractScalableGeometry.Builder<?> builder, ScalableMeshRenderProperties renderProperties,
            Constraints constraints); @Override TriangleScalableGeometry clone(); @Override Builder<? extends Position> createBuilder(); @Override TriangleScalableGeometry derive(BaseRenderProperties renderProperties, Constraints constraints);  }### Answer:
@Test public void testDerive() { TriangleScalableGeometry.Builder<GeographicPosition> builder = new TriangleScalableGeometry.Builder<GeographicPosition>(); builder.setDataModelId(3423L); builder.setRapidUpdate(true); builder.setPosition(new GeographicPosition(LatLonAlt.createFromDegrees(34., 56.))); ScalableMeshRenderProperties renderProperties1 = new DefaultMeshScalableRenderProperties(65763, false, true); TimeConstraint timeConstraint = TimeConstraint.getTimeConstraint(TimeSpan.get(10L, 20L)); Constraints constraints1 = new Constraints(timeConstraint); TriangleScalableGeometry geom = new TriangleScalableGeometry(builder, renderProperties1, constraints1); AbstractRenderableGeometry absGeom = geom; BaseRenderProperties renderProperties2 = renderProperties1.clone(); Constraints constraints2 = new Constraints(timeConstraint); AbstractRenderableGeometry derived = absGeom.derive(renderProperties2, constraints2); Assert.assertNotSame(geom, derived); Assert.assertEquals(geom.getDataModelId(), derived.getDataModelId()); Assert.assertEquals(geom.getRenderProperties(), ((TriangleScalableGeometry)derived).getRenderProperties()); Assert.assertEquals(geom.getPolygonVertexCount(), ((TriangleScalableGeometry)derived).getPolygonVertexCount()); Assert.assertEquals(geom.getPosition(), ((TriangleScalableGeometry)derived).getPosition()); Assert.assertEquals(geom.getColors(), ((TriangleScalableGeometry)derived).getColors()); Assert.assertEquals(geom.getNormals(), ((TriangleScalableGeometry)derived).getNormals()); Assert.assertEquals(geom.getPositions(), ((TriangleScalableGeometry)derived).getPositions()); Assert.assertEquals(geom.isRapidUpdate(), derived.isRapidUpdate()); Assert.assertNotSame(geom.getRenderProperties(), derived.getRenderProperties()); Assert.assertSame(renderProperties2, derived.getRenderProperties()); Assert.assertNotSame(geom.getConstraints(), derived.getConstraints()); Assert.assertSame(constraints2, derived.getConstraints()); }