AbstractAction implements Action<T> { public abstract String getRestMethodName(); AbstractAction(); @SuppressWarnings("unchecked")  AbstractAction(Builder builder); static String getIdFromSource(Object source); Collection<Object> getParameter(String parameter); Object getHeader(String header); @Override Map<String, Object> getHeaders(); @Override String getURI(ElasticsearchVersion elasticsearchVersion); @Override String getData(Gson gson); @Override String getPathToResult(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); abstract String getRestMethodName(); static String CHARSET; }
@Test public void restMethodNameMultipleClientRequest() { Get get = new Get.Builder("twitter", "1").type("tweet").build(); assertEquals("GET", get.getRestMethodName()); Delete del = new Delete.Builder("1").index("twitter").type("tweet").build(); assertEquals("DELETE", del.getRestMethodName()); }