### Question:
TorusMeshGeometry extends PolygonMeshGeometry { @Override public TorusMeshGeometry derive(BaseRenderProperties renderProperties, Constraints constraints) throws ClassCastException { return new TorusMeshGeometry(createBuilder(), (PolygonMeshRenderProperties)renderProperties, constraints); } TorusMeshGeometry(Builder<?> builder, PolygonMeshRenderProperties renderProperties, Constraints constraints); @Override TorusMeshGeometry clone(); @Override Builder<? extends Position> createBuilder(); @Override TorusMeshGeometry derive(BaseRenderProperties renderProperties, Constraints constraints); Position getCenter(); int getCirPoints(); Matrix3d getPositionTransform(); double getRadius(); double getTubeRadius(); int getTubeSections();  }### Answer:
@Test public void testDerive() { TorusMeshGeometry.Builder<GeographicPosition> builder = new TorusMeshGeometry.Builder<GeographicPosition>(); builder.setDataModelId(3423L); builder.setRapidUpdate(true); builder.setCircularPoints(13); builder.setRadius(.123f); builder.setTubeRadius(.0543); builder.setTubeSections(20); builder.setPositionTransform(new Matrix3d()); builder.setCenter(new GeographicPosition(LatLonAlt.createFromDegrees(34., 56.))); PolygonMeshRenderProperties renderProperties1 = new DefaultPolygonMeshRenderProperties(65763, false, true, true); TimeConstraint timeConstraint = TimeConstraint.getTimeConstraint(TimeSpan.get(10L, 20L)); Constraints constraints1 = new Constraints(timeConstraint); TorusMeshGeometry geom = new TorusMeshGeometry(builder, renderProperties1, constraints1); AbstractRenderableGeometry absGeom = geom; ColorRenderProperties 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.getRadius(), ((TorusMeshGeometry)derived).getRadius(), 0.f); Assert.assertEquals(geom.getTubeRadius(), ((TorusMeshGeometry)derived).getTubeRadius(), 0.f); Assert.assertEquals(geom.getTubeSections(), ((TorusMeshGeometry)derived).getTubeSections()); Assert.assertEquals(geom.getCenter(), ((TorusMeshGeometry)derived).getCenter()); Assert.assertEquals(geom.getCirPoints(), ((TorusMeshGeometry)derived).getCirPoints()); Assert.assertEquals(geom.getPositionTransform(), ((TorusMeshGeometry)derived).getPositionTransform()); Assert.assertNotSame(geom.getPositionTransform(), ((TorusMeshGeometry)derived).getPositionTransform()); Assert.assertEquals(geom.getPolygonVertexCount(), ((TorusMeshGeometry)derived).getPolygonVertexCount()); Assert.assertEquals(geom.getColors(), ((TorusMeshGeometry)derived).getColors()); Assert.assertEquals(geom.getNormals(), ((TorusMeshGeometry)derived).getNormals()); Assert.assertEquals(geom.getPositions(), ((TorusMeshGeometry)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()); }