### Question:
QueryBuilders { static ExistsQueryBuilder existsQuery( String name ) { return new ExistsQueryBuilder( name ); } private  QueryBuilders();   }### Answer:
@Test public void exists() throws Exception { assertEquals( "{\"exists\":{\"field\":\"foo\"}}", toJson( QueryBuilders.existsQuery( "foo" ) ) ); }