### Question:
RegriddingLUT2 implements LUT { static Grid readGrid(File file, double fillValue) throws IOException { final int w = GRID_DEF_020.getWidth(); final int h = GRID_DEF_020.getHeight(); final double[] data = new double[w * h]; final int columnWidth = 9; final BufferedReader reader = new BufferedReader(new FileReader(file)); try { for (int y = 0; y < h; y++) { final String line = reader.readLine(); for (int x = 0; x < w; x++) { final String column = line.substring(x * columnWidth, x * columnWidth + columnWidth); double value = Double.parseDouble(column); if (value == fillValue) { value = Double.NaN; } data[w * y + x] = value; } } } finally { try { reader.close(); } catch (IOException e) { } } return ArrayGrid.create(GRID_DEF_020, data); } private  RegriddingLUT2(Grid grid); @Override Grid getGrid();  }### Answer:
@Test public void testReadGrid() throws Exception { final File file = getResourceAsFile("x0_time.txt"); final Grid grid = RegriddingLUT2.readGrid(file, -32768.0); assertTrue(Double.isNaN(grid.getSampleDouble(0, 0))); assertEquals(4.29, grid.getSampleDouble(1, 5), 0.0); assertEquals(2.64, grid.getSampleDouble(0, 13), 0.0); assertEquals(2.66, grid.getSampleDouble(1, 13), 0.0); assertEquals(4.99, grid.getSampleDouble(179, 87), 0.0); assertEquals(1.00, grid.getSampleDouble(0, 88), 0.0); assertEquals(10.0, grid.getSampleDouble(0, 89), 0.0); }