ValidatingTransform extends Transform { @Override public Transform translate(final double x, final double y, final double z) { super.translate(x, y, z); validate(); return this; } ValidatingTransform();  ValidatingTransform(final ReadOnlyTransform source); @Override Transform fromHomogeneousMatrix(final ReadOnlyMatrix4 matrix); @Override ValidatingTransform setRotation(final ReadOnlyMatrix3 rotation); @Override ValidatingTransform setRotation(final ReadOnlyQuaternion rotation); @Override ValidatingTransform setScale(final double x, final double y, final double z); @Override ValidatingTransform setScale(final double uniformScale); @Override ValidatingTransform setScale(final ReadOnlyVector3 scale); @Override ValidatingTransform setTranslation(final double x, final double y, final double z); @Override ValidatingTransform setTranslation(final ReadOnlyVector3 translation); @Override Transform translate(final double x, final double y, final double z); @Override Transform translate(final ReadOnlyVector3 vec); @Override Transform multiply(final ReadOnlyTransform transformBy, final Transform store); @Override Transform invert(final Transform store); @Override Transform set(final ReadOnlyTransform source); @Override ValidatingTransform clone();  }
@Test(expected = InvalidTransformException.class) public void testTranslateDoubleDoubleDouble() { final ValidatingTransform vt1 = new ValidatingTransform(); vt1.translate(1, 2, 3); vt1.translate(0, 0, Double.NaN); }
@Test(expected = InvalidTransformException.class) public void testTranslateReadOnlyVector3() { final ValidatingTransform vt1 = new ValidatingTransform(); vt1.translate(new Vector3(1, 2, 3)); vt1.translate(new Vector3(0, 0, Double.NaN)); }
@Test(expected = InvalidTransformException.class) public void failConstructor() { final Transform bad = new Transform(); bad.translate(Double.NaN, 1, 2); new ValidatingTransform(Transform.IDENTITY); new ValidatingTransform(bad); }