### Question:
QueryBuilders { static TermQueryBuilder termQuery(String name, String value) { return new TermQueryBuilder(name, value); } private  QueryBuilders();   }### Answer:
@Test void term() throws Exception { assertEquals("{\"term\":{\"foo\":\"bar\"}}", toJson(QueryBuilders.termQuery("foo", "bar"))); assertEquals("{\"term\":{\"bar\":\"foo\"}}", toJson(QueryBuilders.termQuery("bar", "foo"))); assertEquals("{\"term\":{\"foo\":\"A\"}}", toJson(QueryBuilders.termQuery("foo", 'A'))); assertEquals("{\"term\":{\"foo\":true}}", toJson(QueryBuilders.termQuery("foo", true))); assertEquals("{\"term\":{\"foo\":false}}", toJson(QueryBuilders.termQuery("foo", false))); assertEquals("{\"term\":{\"foo\":0}}", toJson(QueryBuilders.termQuery("foo", (byte) 0))); assertEquals("{\"term\":{\"foo\":123}}", toJson(QueryBuilders.termQuery("foo", (long) 123))); assertEquals("{\"term\":{\"foo\":41}}", toJson(QueryBuilders.termQuery("foo", (short) 41))); assertEquals("{\"term\":{\"foo\":42.42}}", toJson(QueryBuilders.termQuery("foo", 42.42D))); assertEquals("{\"term\":{\"foo\":1.1}}", toJson(QueryBuilders.termQuery("foo", 1.1F))); assertEquals("{\"term\":{\"foo\":1}}", toJson(QueryBuilders.termQuery("foo", new BigDecimal(1)))); assertEquals("{\"term\":{\"foo\":121}}", toJson(QueryBuilders.termQuery("foo", new BigInteger("121")))); assertEquals("{\"term\":{\"foo\":111}}", toJson(QueryBuilders.termQuery("foo", new AtomicLong(111)))); assertEquals("{\"term\":{\"foo\":222}}", toJson(QueryBuilders.termQuery("foo", new AtomicInteger(222)))); assertEquals("{\"term\":{\"foo\":true}}", toJson(QueryBuilders.termQuery("foo", new AtomicBoolean(true)))); }