### Question:
SpectralUtils { public static void ifftshift_inplace(ComplexDoubleMatrix inMatrix) throws IllegalArgumentException { inMatrix.copy(ifftshift(inMatrix)); }  static void fft1D_inplace(ComplexDoubleMatrix vector, final int fftLength); static void invfft1D_inplace(ComplexDoubleMatrix vector, final int fftLength); static ComplexDoubleMatrix fft1D(ComplexDoubleMatrix vector, final int fftLength); static ComplexDoubleMatrix invfft1D(ComplexDoubleMatrix vector, final int fftLength); static ComplexDoubleMatrix fft(ComplexDoubleMatrix inMatrix, final int dimension); static ComplexDoubleMatrix invfft(ComplexDoubleMatrix inMatrix, final int dimension); static void fft_inplace(ComplexDoubleMatrix inMatrix, int dimension); static void invfft_inplace(ComplexDoubleMatrix inMatrix, int dimension); static void fft2D_inplace(ComplexDoubleMatrix A); static ComplexDoubleMatrix fft2D(ComplexDoubleMatrix inMatrix); static void fft2D_inplace(DoubleMatrix A); static void invfft2D_inplace(ComplexDoubleMatrix A); static ComplexDoubleMatrix invfft2d(ComplexDoubleMatrix inMatrix); static ComplexDoubleMatrix fftshift(ComplexDoubleMatrix inMatrix); static DoubleMatrix fftshift(DoubleMatrix inMatrix); static void fftshift_inplace(ComplexDoubleMatrix inMatrix); static void fftshift_inplace(DoubleMatrix inMatrix); static ComplexDoubleMatrix ifftshift(ComplexDoubleMatrix inMatrix); static DoubleMatrix ifftshift(DoubleMatrix inMatrix); static void ifftshift_inplace(ComplexDoubleMatrix inMatrix); static void ifftshift_inplace(DoubleMatrix inMatrix);  }### Answer:
@Test public void testIfftshiftDouble_inplace() throws Exception { double[] shiftVectorTemp_EXPECTED = shiftVector_EXPECTED.clone(); DoubleMatrix matrixDouble_EXPECTED = new DoubleMatrix(vector_EXPECTED); DoubleMatrix matrixDouble_ACTUAL = new DoubleMatrix(shiftVectorTemp_EXPECTED); SpectralUtils.ifftshift_inplace(matrixDouble_ACTUAL); Assert.assertEquals(matrixDouble_EXPECTED, matrixDouble_ACTUAL); }
@Test public void testIfftshiftComplex_inplace() throws Exception { double[] shiftVectorTemp_EXPECTED = shiftVector_EXPECTED.clone(); ComplexDoubleMatrix matrixCplx_ACTUAL = new ComplexDoubleMatrix(new DoubleMatrix(shiftVectorTemp_EXPECTED), new DoubleMatrix(shiftVectorTemp_EXPECTED)); ComplexDoubleMatrix matrixCplx_EXPECTED = new ComplexDoubleMatrix(new DoubleMatrix(vector_EXPECTED), new DoubleMatrix(vector_EXPECTED)); SpectralUtils.ifftshift_inplace(matrixCplx_ACTUAL); Assert.assertEquals(matrixCplx_EXPECTED, matrixCplx_ACTUAL); }