### Question:
EllipsoidGeometryBuilder extends AbstractGeometry.Builder { protected Matrix4d generateTransform() { Matrix4d transform = null; if (myLocation instanceof GeographicPosition) { transform = myTransformProvider.provideTransform(((GeographicPosition)myLocation).getLatLonAlt(), myHeading, myPitch, myRoll); } else { transform = myTransformProvider.provideTransform(myLocation.asVector3d(), myHeading, myPitch, myRoll); } return transform; } EllipsoidGeometryBuilder(MapManager mapManager); double getAxisAMeters(); double getAxisBMeters(); double getAxisCMeters(); Color getColor(); double getHeading(); T getLocation(); MapManager getMapManager(); double getPitch(); int getQuality(); double getRoll(); void setAxisAMeters(double axisAMeters); void setAxisBMeters(double axisBMeters); void setAxisCMeters(double axisCMeters); void setColor(Color color); void setHeading(double heading); void setLocation(T location); void setPitch(double pitch); void setQuality(int quality); void setRoll(double roll);  }### Answer:
@Test public void testGenerateTransform() { EasyMockSupport support = new EasyMockSupport(); MapManager mapManager = EllipsoidTestUtils.createMapManager(support); support.replayAll(); LatLonAlt location = LatLonAlt.createFromDegreesMeters(10, 11, 5280, ReferenceLevel.TERRAIN); EllipsoidGeometryBuilder<GeographicPosition> builder = new EllipsoidGeometryBuilder<>(mapManager); builder.setLocation(new GeographicPosition(location)); builder.setHeading(14); builder.setPitch(15); builder.setRoll(16); Matrix4d transform = builder.generateTransform(); Matrix4d expected = new Matrix4d(new double[] { -0.5187182308412952, 0.8122809550672292, -.26670404389125235, 0.0, -0.8501440620567355, -0.45705076232245867, 0.2614568308729626, 0.0, 0.0904791177153618, 0.36235928399246203, 0.9276363935087497, 0.0, 11.0, 10.0, 5280.0, 1.0 }); assertEquals(expected, transform); EllipsoidGeometryBuilder<ModelPosition> modelBuilder = new EllipsoidGeometryBuilder<>(mapManager); modelBuilder.setLocation(new ModelPosition(11, 10, 5280)); modelBuilder.setHeading(14); modelBuilder.setPitch(15); modelBuilder.setRoll(16); transform = modelBuilder.generateTransform(); assertEquals(expected, transform); support.verifyAll(); }