Update extends SingleResultAbstractDocumentTargetedAction implements BulkableAction<DocumentResult> { @Override public String getRestMethodName() { return "POST"; } protected  Update(Builder builder); @Override String getBulkMethodName(); @Override String getRestMethodName(); @Override String getPathToResult(); @Override String getData(Gson gson);  }
@Test public void updateDocumentWithoutDoc(){ Update update = new Update.Builder(new Object()).index("twitter").type("tweet").id("1").build(); assertEquals("POST", update.getRestMethodName()); assertEquals("twitter/tweet/1/_update", update.getURI(ElasticsearchVersion.UNKNOWN)); }