Ellipsoid { public void setSemiAxes(final Vector3dc u, final Vector3dc v, final Vector3dc w) { final List<Vector3d> semiAxes = Stream.of(u, v, w).map(Vector3d::new) .sorted(comparingDouble(Vector3d::length)).collect(toList()); setC(semiAxes.get(2).length()); setB(semiAxes.get(1).length()); setA(semiAxes.get(0).length()); setOrientation(semiAxes.get(0), semiAxes.get(1), semiAxes.get(2)); } Ellipsoid(final double a, final double b, final double c);  Ellipsoid(final Vector3dc u, final Vector3dc v, final Vector3dc w); double getA(); void setA(final double a); double getB(); void setB(final double b); double getC(); void setC(final double c); Vector3d getCentroid(); void setCentroid(final Vector3dc centroid); Matrix4d getOrientation(); void setOrientation(final Matrix3dc semiAxes); List<Vector3d> getSemiAxes(); double getVolume(); @SuppressWarnings("unchecked") void initSampling(final OpEnvironment ops); List<Vector3d> samplePoints(final long n); void setSemiAxes(final Vector3dc u, final Vector3dc v,
		final Vector3dc w);  }
@Test(expected = NullPointerException.class) public void testSetSemiAxesThrowsNPEIfParameterNull() { final Ellipsoid ellipsoid = new Ellipsoid(1, 2, 3); ellipsoid.setSemiAxes(new Vector3d(), new Vector3d(), null); }