ConvertLatLon { public static final void checkBounds(double latitude, double longitude) throws DatatypeFormatException { if (latitude < -90.0 || latitude > 90.0) { throw new DatatypeFormatException("Lat/Lon out of bounds: " + latitude + ", " + longitude); } else if (longitude < -180.0 || longitude > 180.0) { throw new DatatypeFormatException("Lat/Lon out of bounds: " + latitude + ", " + longitude); } }  static final Literal toLiteral(double lat, double lon); static final String toWKT(double lat, double lon); static final NodeValue toNodeValue(NodeValue latNodeValue, NodeValue lonNodeValue); static double extractDouble(NodeValue nodeValue); static final Node toNode(Node latNode, Node lonNode); static final GeometryWrapper toGeometryWrapper(Node latNode, Node lonNode); static final void checkBounds(double latitude, double longitude);  }
@Test(expected = DatatypeFormatException.class) public void testCheckBounds_lat_too_big() { double latitude = 90.1; double longitude = 0.0; ConvertLatLon.checkBounds(latitude, longitude); }
@Test(expected = DatatypeFormatException.class) public void testCheckBounds_lat_too_small() { double latitude = -90.1; double longitude = 0.0; ConvertLatLon.checkBounds(latitude, longitude); }
@Test(expected = DatatypeFormatException.class) public void testCheckBounds_lon_too_big() { double latitude = 0.0; double longitude = 180.1; ConvertLatLon.checkBounds(latitude, longitude); }
@Test(expected = DatatypeFormatException.class) public void testCheckBounds_lon_too_small() { double latitude = 0.0; double longitude = -180.1; ConvertLatLon.checkBounds(latitude, longitude); }
@Test public void testCheckBounds_lat_big() { double latitude = 90.0; double longitude = 0.0; ConvertLatLon.checkBounds(latitude, longitude); }
@Test public void testCheckBounds_lat_small() { double latitude = -90.0; double longitude = 0.0; ConvertLatLon.checkBounds(latitude, longitude); }
@Test public void testCheckBounds_lon_big() { double latitude = 0.0; double longitude = 180.0; ConvertLatLon.checkBounds(latitude, longitude); }
@Test public void testCheckBounds_lon_small() { double latitude = 0.0; double longitude = -180.0; ConvertLatLon.checkBounds(latitude, longitude); }