OverpassQueryBuilderImpl implements OverpassQueryBuilder { @Override public OverpassQueryBuilder boundingBox(double lat1, double lon1, double lat2, double lon2) { return append( String.format( LOCALE, "(%s,%s,%s,%s)", lat1, lon1, lat2, lon2 ) ); } OverpassQueryBuilderImpl(); @Override OverpassQueryBuilder append(String statement); @Override OverpassQueryBuilder boundingBox(double lat1, double lon1, double lat2, double lon2); @Override OverpassQueryBuilder around(double radius); @Override OverpassQueryBuilder around(double radius, double lat, double lon); @Override OverpassQueryBuilder setting(String name, String value); @Override OverpassQueryBuilder standaloneParam(String name); @Override OverpassQueryBuilder clause(String name, String value); @Override OverpassQueryBuilder equals(String name, String value); @Override OverpassQueryBuilder notEquals(String name, String value); @Override OverpassQueryBuilder regexMatches(String name, String value); @Override OverpassQueryBuilder regexDoesntMatch(String name, String value); @Override OverpassQueryBuilder multipleValues(String name, Set<String> values); @Override String build();  }
@Test public void testBoundingBox() throws Exception { queryBuilder.boundingBox(1.01d, 2.002d, 3.003d, 4.0004d); assertEquals("(1.01,2.002,3.003,4.0004)", queryBuilder.build()); }