### Question:
HorizontalMesh implements DiscreteHorizontalDomain<HorizontalCell>, Serializable { @Override public boolean contains(HorizontalPosition position) { for (NestedBoundary boundary : topLevelBoundaries) { if (boundary.contains(position)) { return true; } } return false; } private  HorizontalMesh(List<HorizontalPosition> positions, List<Polygon> boundaries); static HorizontalMesh fromConnections(List<HorizontalPosition> positions,
            List<int[]> connections, int connectionsStartFrom); static HorizontalMesh fromBounds(List<HorizontalPosition> positions,
            List<Polygon> boundaries); @Override Array<HorizontalCell> getDomainObjects(); @Override boolean contains(HorizontalPosition position); @Override BoundingBox getBoundingBox(); @Override GeographicBoundingBox getGeographicBoundingBox(); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(); @Override long size(); int findIndexOf(HorizontalPosition position); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testNestedContains() { assertTrue(mesh.contains(new HorizontalPosition(0.5, 0.5))); assertTrue(mesh.contains(new HorizontalPosition(4.5, 2))); assertTrue(mesh.contains(new HorizontalPosition(10.5, 4.5))); assertTrue(mesh.contains(new HorizontalPosition(14.5, 2.5))); assertFalse(mesh.contains(new HorizontalPosition(2, 2))); assertFalse(mesh.contains(new HorizontalPosition(11.5, 3.5))); assertFalse(mesh.contains(new HorizontalPosition(6.5, 5.5))); assertFalse(mesh.contains(new HorizontalPosition(1.5, 5.5))); assertTrue(mesh.contains(new HorizontalPosition(12.5, 4.5))); assertTrue(mesh.contains(new HorizontalPosition(2.5, 4.5))); assertTrue(mesh.contains(new HorizontalPosition(2.1, 5.1))); assertTrue(mesh.contains(new HorizontalPosition(2.9, 5.9))); assertFalse(mesh.contains(new HorizontalPosition(2.5, 5.5))); }