### Question:
GridCell2DImpl implements GridCell2D { @Override public boolean contains(HorizontalPosition position) { return footprint.contains(position); } GridCell2DImpl(GridCoordinates2D gridCoords, HorizontalPosition centre,
            Polygon footprint, HorizontalGrid parentGrid); @Override GridCoordinates2D getGridCoordinates(); @Override HorizontalPosition getCentre(); @Override Polygon getFootprint(); @Override boolean contains(HorizontalPosition position); @Override HorizontalGrid getParentDomain(); @Override String toString();  }### Answer:
@Test public void testContains() { Array<GridCell2D> cells = rGrid.getDomainObjects(); GridCell2D cell = cells.get(0, 0); HorizontalPosition position = new HorizontalPosition(120.0, 30.0, crs); assertFalse(cell.contains(position)); assertFalse(cell.contains(null)); cell = cells.get(3, 4); position = new HorizontalPosition(97.2, 34.444, crs); assertTrue(cell.contains(position)); assertEquals(rGrid, cell.getParentDomain()); }