@Test
public void testMultiply() {

  final Vector4 vec1 = new Vector4(1, -1, 2, -2);
  final Vector4 vec2 = vec1.multiply(2.0, null);
  final Vector4 vec2B = vec1.multiply(2.0, new Vector4());
  assertEquals(new Vector4(2.0, -2.0, 4.0, -4.0), vec2);
  assertEquals(new Vector4(2.0, -2.0, 4.0, -4.0), vec2B);
  vec2.multiplyLocal(0.5);
  assertEquals(new Vector4(1.0, -1.0, 2.0, -2.0), vec2);
  final Vector4 vec3 = vec1.multiply(vec2, null);
  final Vector4 vec3B = vec1.multiply(vec2, new Vector4());
  assertEquals(new Vector4(1, 1, 4, 4), vec3);
  assertEquals(new Vector4(1, 1, 4, 4), vec3B);
  final Vector4 vec4 = vec1.multiply(2, 3, 2, 3, null);
  final Vector4 vec4B = vec1.multiply(2, 3, 2, 3, new Vector4());
  assertEquals(new Vector4(2, -3, 4, -6), vec4);
  assertEquals(new Vector4(2, -3, 4, -6), vec4B);
  vec1.multiplyLocal(0.5, 0.5, 0.5, 0.5);
  assertEquals(new Vector4(0.5, -0.5, 1.0, -1.0), vec1);
  vec1.multiplyLocal(vec2);
  assertEquals(new Vector4(0.5, 0.5, 2.0, 2.0), vec1);
}