### Question:
Matrix extends Tensor<Matrix> { @Override public Matrix copy() { return new Matrix(data.clone(), rows(), cols()); } Matrix(double[] data, int rows, int cols); static Matrix fill(double v, int rows, int cols); @Override Matrix zeros(); @Override Matrix copy(); @Override Matrix add(Matrix b);  }### Answer:
@Test void createsMatrixCopy() { Matrix matrix = new Matrix(new double[]{1D, .1, 4D, -5D}, 2, 2); Matrix copy = matrix.copy(); assertNotSame(matrix, copy); assertArrayEquals(matrix.dimensions, copy.dimensions); assertNotSame(matrix.data, copy.data); assertArrayEquals(matrix.data, copy.data); }