### Question:
EllipsoidGeometryBuilder extends AbstractGeometry.Builder { protected PolygonMeshGeometry.Builder<Position> generatePolygonMeshBuilder() { PolygonMeshGeometry.Builder<Position> builder = new PolygonMeshGeometry.Builder<>(); List<List<Position>> vertices = myVertexGenerator.generateVertices(myQuality, myAxisAMeters, myAxisBMeters, myAxisCMeters); List<List<Vector3d>> normals = myNormalsGenerator.calculateNormals(vertices); List<Position> allVertices = New.list(); for (List<Position> strip : vertices) { allVertices.addAll(strip); } List<Vector3d> allNormals = New.list(); for (List<Vector3d> stripNormals : normals) { allNormals.addAll(stripNormals); } List<Color> colors = New.list(); for (int i = 0; i < allNormals.size(); i++) { colors.add(myColor); } builder.setColors(colors); builder.setNormals(allNormals); builder.setPolygonVertexCount(AbstractRenderer.TRIANGLE_STRIP_VERTEX_COUNT); builder.setPositions(allVertices); builder.setDataModelId(getDataModelId()); return builder; } 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 testGeneratePolygonMeshBuilder() { EasyMockSupport support = new EasyMockSupport(); MapManager mapManager = support.createMock(MapManager.class); support.replayAll(); EllipsoidGeometryBuilder<GeographicPosition> builder = new EllipsoidGeometryBuilder<>(mapManager); builder.setAxisAMeters(EllipsoidTestUtils.AXIS_A); builder.setAxisBMeters(EllipsoidTestUtils.AXIS_B); builder.setAxisCMeters(EllipsoidTestUtils.AXIS_C); builder.setQuality(EllipsoidTestUtils.QUALITY); builder.setColor(Color.RED); List<List<Position>> expectedPositions = EllipsoidTestUtils.getExpectedPositions(); List<Position> combinedExpected = New.list(); for (List<Position> strip : expectedPositions) { combinedExpected.addAll(strip); } Builder<Position> meshBuilder = builder.generatePolygonMeshBuilder(); List<? extends Color> colors = meshBuilder.getColors(); assertEquals(combinedExpected.size(), colors.size()); for (Color color : colors) { assertEquals(Color.RED, color); } assertEquals(AbstractRenderer.TRIANGLE_STRIP_VERTEX_COUNT, meshBuilder.getPolygonVertexCount()); List<? extends Position> positions = meshBuilder.getPositions(); assertEquals(combinedExpected.size(), positions.size()); int index = 0; for (Position position : positions) { assertEquals(combinedExpected.get(index).asVector3d(), position.asVector3d()); index++; } List<Vector3d> expectedNormals = EllipsoidTestUtils.calculateExpectedNormals(expectedPositions); assertEquals(combinedExpected.size(), expectedNormals.size()); List<? extends Vector3d> actualNormals = meshBuilder.getNormals(); assertEquals(combinedExpected.size(), actualNormals.size()); assertEquals(expectedNormals, actualNormals); support.verifyAll(); }