### Question:
Transform { public Transform invert() { Quaternion inverseRotationAndScale = rotationAndScale.invert(); return new Transform(inverseRotationAndScale.rotateAndScaleVector(translation.invert()), inverseRotationAndScale); } Transform(Vector3 translation, Quaternion rotation); static Transform fromTransformMessage(geometry_msgs.Transform message); static Transform fromPoseMessage(geometry_msgs.Pose message); static Transform identity(); static Transform xRotation(double angle); static Transform yRotation(double angle); static Transform zRotation(double angle); static Transform translation(double x, double y, double z); static Transform translation(Vector3 vector); Transform multiply(Transform other); Transform invert(); Vector3 apply(Vector3 vector); Quaternion apply(Quaternion quaternion); Transform scale(double factor); double getScale(); double[] toMatrix(); geometry_msgs.Transform toTransformMessage(geometry_msgs.Transform result); geometry_msgs.Pose toPoseMessage(geometry_msgs.Pose result); geometry_msgs.PoseStamped toPoseStampedMessage(GraphName frame, Time stamp,
      geometry_msgs.PoseStamped result); boolean almostEquals(Transform other, double epsilon); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testInvert() { Transform transform = new Transform(Vector3.yAxis(), Quaternion.fromAxisAngle(Vector3.zAxis(), Math.PI / 2)); Transform inverse = transform.invert(); assertEquals(-1.0, inverse.getTranslation().getX(), 1e-9); assertEquals(0.0, inverse.getTranslation().getY(), 1e-9); assertEquals(0.0, inverse.getTranslation().getZ(), 1e-9); assertEquals(0.0, inverse.getRotationAndScale().getX(), 1e-9); assertEquals(0.0, inverse.getRotationAndScale().getY(), 1e-9); assertEquals(-0.7071067811865475, inverse.getRotationAndScale().getZ(), 1e-9); assertEquals(0.7071067811865475, inverse.getRotationAndScale().getW(), 1e-9); Transform neutral = transform.multiply(inverse); assertTrue(neutral.almostEquals(Transform.identity(), 1e-9)); }