### Question:
Ellipsoid { public static Point ell2xyz(final double phi, final double lambda, final double height) throws IllegalArgumentException { if (phi > Math.PI || phi < -Math.PI || lambda > Math.PI || lambda < -Math.PI) { throw new IllegalArgumentException("Ellipsoid.ell2xyz : input values for phi/lambda have to be in radians!"); } final double N = computeEllipsoidNormal(phi); final double Nph = N + height; return new Point( Nph * Math.cos(phi) * Math.cos(lambda), Nph * Math.cos(phi) * Math.sin(lambda), (Nph - e2 * N) * Math.sin(phi)); } Ellipsoid();  Ellipsoid(final double semiMajor, final double semiMinor);  Ellipsoid(Ellipsoid ell); void showdata(); static double[] xyz2ell(final Point xyz); static Point ell2xyz(final double phi, final double lambda, final double height); static Point ell2xyz(final double[] phiLambdaHeight); static Point ell2xyz(final GeoPoint geoPoint, final double height); static Point ell2xyz(final GeoPoint geoPoint); static void ell2xyz(final GeoPoint geoPoint, double[] xyz); static void ell2xyz(final GeoPoint geoPoint, final double height, final double[] xyz); static double a; static double b; static String name; }### Answer:
@Test public void testEll2xyz() throws Exception { Point cr4_XYZ_actual = Ellipsoid.ell2xyz(cr_GEO_expected[0] * DTOR, cr_GEO_expected[1] * DTOR, cr_GEO_expected[2]); for (int i = 0; i < cr_XYZ_expected.length; i++) { Assert.assertEquals(cr_XYZ_expected[i],cr4_XYZ_actual.toArray()[i], deltaXYZ); } }
@Test public void testEll2xyz_ARRAYS() throws Exception { GeoPoint geoPoint_EXPECTED = new GeoPoint(cr_GEO_expected[0], cr_GEO_expected[1]); double[] xyz_ACTUAL = new double[3]; Ellipsoid.ell2xyz(geoPoint_EXPECTED, cr_GEO_expected[2], xyz_ACTUAL); for (int i = 0; i < cr_XYZ_expected.length; i++) { Assert.assertEquals(cr_XYZ_expected[i], xyz_ACTUAL[i], deltaXYZ); } }