### Question:
ArrayTransposeWorker extends Worker { @Override ArrayResult executeOperation() { var arrayInput = (ArrayInput) this.getReceivedData(); final var rows = arrayInput.data[0].length; final var cols = arrayInput.data.length; var resultData = new int[rows][cols]; for (var i = 0; i < cols; i++) { for (var j = 0; j < rows; j++) { resultData[j][i] = arrayInput.data[i][j]; } } return new ArrayResult(resultData); } ArrayTransposeWorker(Master master, int id);   }### Answer:
@Test void executeOperationTest() { var atm = new ArrayTransposeMaster(1); var atw = new ArrayTransposeWorker(atm, 1); var matrix = new int[][]{{2, 4}, {3, 5}}; var matrixTranspose = new int[][]{{2, 3}, {4, 5}}; var i = new ArrayInput(matrix); atw.setReceivedData(atm, i); var r = atw.executeOperation(); assertTrue(ArrayUtilityMethods.matricesSame(r.data, matrixTranspose)); }