Delete extends SingleResultAbstractDocumentTargetedAction implements BulkableAction<DocumentResult> { @Override public String getRestMethodName() { return "DELETE"; } protected  Delete(Builder builder); @Override String getRestMethodName(); @Override String getPathToResult(); @Override String getBulkMethodName();  }
@Test public void deleteDocument() { Delete delete = new Delete.Builder("1") .index("twitter") .type("tweet") .build(); assertEquals("DELETE", delete.getRestMethodName()); assertEquals("twitter/tweet/1", delete.getURI(ElasticsearchVersion.UNKNOWN)); }
@Test public void deleteDocumentWithVersion() { Delete delete = new Delete.Builder("1") .index("twitter") .type("tweet") .setParameter(Parameters.VERSION, 1) .build(); assertEquals("DELETE", delete.getRestMethodName()); assertEquals("twitter/tweet/1?version=1", delete.getURI(ElasticsearchVersion.UNKNOWN)); }