### Question:
FloatVectorUtil { public static float[] normalize(float[] vector) { float magnitude = magnitude(vector); for (int i = 0; i < vector.length; i++) { vector[i] /= magnitude; } return vector; } private  FloatVectorUtil(); static float[] add(float[] vector1, float[] vector2); static float[] normalize(float[] vector); static float cosine(float[] vector1, float[] vector2); static float dot(float[] vector1, float[] vector2); static float magnitude(float[] vector); static float generalizedJaccard(float[] vector1, float[] vector2); static float[] scalar(float[] vector, float scalar);  }### Answer:
@Test public void testNormalize() { assertEquals(1, FloatVectorUtil.magnitude(FloatVectorUtil.normalize(new float[] { 2, 5, -8, 2, 0 })), 0.0001); }