### Question:
LabelGeometry extends AbstractColorGeometry { @Override public LabelGeometry derive(BaseRenderProperties renderProperties, Constraints constraints) throws ClassCastException { return new LabelGeometry(createBuilder(), (LabelRenderProperties)renderProperties, constraints); } LabelGeometry(LabelGeometry.Builder<?> builder, LabelRenderProperties renderProperties, Constraints constraints); @Override LabelGeometry clone(); @Override Builder<? extends Position> createBuilder(); @Override LabelGeometry derive(BaseRenderProperties renderProperties, Constraints constraints); @Override GeometryOrderKey getGeometryOrderKey(); float getHorizontalAlignment(); Color getOutlineColor(); Position getPosition(); @Override Class<? extends Position> getPositionType(); @Override Position getReferencePoint(); @Override LabelRenderProperties getRenderProperties(); String getText(); float getVerticalAlignment(); boolean isOutlined(); @Override boolean overlaps(BoundingBox<T> boundingBox, double tolerance); @Override String toString();  }### Answer:
@Test public void testDerive() { LabelGeometry.Builder<GeographicPosition> builder = new LabelGeometry.Builder<GeographicPosition>(); builder.setDataModelId(3423L); GeographicPosition position = new GeographicPosition(LatLonAlt.createFromDegrees(23., 56.)); builder.setPosition(position); builder.setRapidUpdate(true); builder.setFont("font"); builder.setText("text"); builder.setHorizontalAlignment(.5f); builder.setVerticalAlignment(.5f); LabelRenderProperties renderProperties1 = new DefaultLabelRenderProperties(65763, false, true); TimeConstraint timeConstraint = TimeConstraint.getTimeConstraint(TimeSpan.get(10L, 20L)); Constraints constraints1 = new Constraints(timeConstraint); LabelGeometry geom = new LabelGeometry(builder, renderProperties1, constraints1); AbstractRenderableGeometry absGeom = geom; LabelRenderProperties 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.getPosition(), ((LabelGeometry)derived).getPosition()); Assert.assertEquals(geom.isRapidUpdate(), derived.isRapidUpdate()); Assert.assertEquals(geom.getText(), ((LabelGeometry)derived).getText()); Assert.assertEquals(geom.getHorizontalAlignment(), ((LabelGeometry)derived).getHorizontalAlignment(), 0f); Assert.assertEquals(geom.getVerticalAlignment(), ((LabelGeometry)derived).getVerticalAlignment(), 0f); Assert.assertNotSame(geom.getRenderProperties(), derived.getRenderProperties()); Assert.assertSame(renderProperties2, derived.getRenderProperties()); Assert.assertNotSame(geom.getConstraints(), derived.getConstraints()); Assert.assertSame(constraints2, derived.getConstraints()); }