### Question:
SimpleHorizontalDomain implements HorizontalDomain, Serializable { @Override public boolean contains(HorizontalPosition position) { return bbox.contains(position); } SimpleHorizontalDomain(double minLon, double minLat, double maxLon, double maxLat);  SimpleHorizontalDomain(double minX, double minY, double maxX, double maxY,
            CoordinateReferenceSystem crs);  SimpleHorizontalDomain(BoundingBox bbox); @Override boolean contains(HorizontalPosition position); @Override BoundingBox getBoundingBox(); @Override GeographicBoundingBox getGeographicBoundingBox(); @Override CoordinateReferenceSystem getCoordinateReferenceSystem(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testContains() throws InvalidCrsException { SimpleHorizontalDomain sdm = new SimpleHorizontalDomain(120, 30, 150, 40); HorizontalPosition position = new HorizontalPosition(125, 32, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(120, 30, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(120, 40, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(150, 30, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(150, 40, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(150, 35, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(130, 35, GISUtils.defaultGeographicCRS()); assertTrue(sdm.contains(position)); position = new HorizontalPosition(125, 42, GISUtils.defaultGeographicCRS()); assertFalse(sdm.contains(position)); position = new HorizontalPosition(305, 32, GISUtils.defaultGeographicCRS()); assertFalse(sdm.contains(position)); position = new HorizontalPosition(295, -20, GISUtils.defaultGeographicCRS()); assertFalse(sdm.contains(position)); position = new HorizontalPosition(-60, 20.7, GISUtils.defaultGeographicCRS()); assertFalse(sdm.contains(position)); CoordinateReferenceSystem chinaArea = GISUtils.getCrs("EPSG:2426"); assertFalse(sdm.contains(new HorizontalPosition(500000, 4261964.001513, chinaArea))); CoordinateReferenceSystem japanArea = GISUtils.getCrs("EPSG:2450"); assertTrue(sdm.contains(new HorizontalPosition(17945.194292, 41625.344542, japanArea))); }