Optimize extends GenericResultAbstractAction { @Override public String getRestMethodName() { return "POST"; } protected  Optimize(Builder builder); @Override String getRestMethodName();  }
@Test public void testBasicUriGeneration() { Optimize optimize = new Optimize.Builder().addIndex("twitter").build(); assertEquals("POST", optimize.getRestMethodName()); assertEquals("twitter/_optimize", optimize.getURI(ElasticsearchVersion.UNKNOWN)); }