### Question:
OutputHelper { public static int[] flipSecondScanline(int buffer[], int xResolution, int yResolution) { int bufferTwo[] = buffer.clone(); for (int y=0; y<yResolution; y++) { if (y%2==1) { int ofs = y*xResolution; for (int x=0; x<xResolution; x++) { bufferTwo[ofs+x] = buffer[xResolution+ofs-x-1]; } } } return bufferTwo; } private  OutputHelper(); static int[] flipSecondScanline(int buffer[], int xResolution, int yResolution); static int[] manualMapping(int src[], int mapping[], int xResolution, int yResolution); static byte[] convertBufferTo15bit(int[] data, ColorFormat colorFormat); static byte[] convertBufferTo15bit(int[] data, ColorFormat colorFormat, RGBAdjust correction); static byte[] convertBufferTo24bit(int[] data, ColorFormat colorFormat); static String getSerialPortName(String configuredName);  }### Answer:
@Test public void testFlip3x8() { int[] ret; int[] buffer = new int[] { 0,0,0, 1,2,3, 4,5,6, 7,8,9, 0,1,1, 0,2,2, 0,3,3, 0,4,4, }; ret = OutputHelper.flipSecondScanline(buffer, 3, 8); assertEquals(0, ret[0]); assertEquals(3, ret[3]); assertEquals(2, ret[4]); assertEquals(1, ret[5]); assertEquals(4, ret[6]); }