Flush extends GenericResultAbstractAction { @Override public String getRestMethodName() { return "POST"; } protected  Flush(Builder builder); @Override String getRestMethodName();  }
@Test public void testBasicUriGeneration() { Flush flush = new Flush.Builder().addIndex("twitter").addIndex("myspace").build(); assertEquals("POST", flush.getRestMethodName()); assertEquals("twitter%2Cmyspace/_flush", flush.getURI(ElasticsearchVersion.UNKNOWN)); }
@Test public void testBasicUriGenerationWithForce() { Flush flush = new Flush.Builder().addIndex("twitter").force().build(); assertEquals("POST", flush.getRestMethodName()); assertEquals("twitter/_flush?force=true", flush.getURI(ElasticsearchVersion.UNKNOWN)); }
@Test public void testBasicUriGenerationWithWaitIfOngoing() { Flush flush = new Flush.Builder().addIndex("twitter").waitIfOngoing().build(); assertEquals("POST", flush.getRestMethodName()); assertEquals("twitter/_flush?wait_if_ongoing=true", flush.getURI(ElasticsearchVersion.UNKNOWN)); }