Index extends SingleResultAbstractDocumentTargetedAction implements BulkableAction<DocumentResult> { protected Index(Builder builder) { super(builder); this.payload = builder.source; } protected  Index(Builder builder); @Override String getPathToResult(); @Override String getRestMethodName(); @Override String getBulkMethodName();  }
@Test public void equals() { Object source = new Object(); Index index1 = new Index.Builder(source).index("twitter").type("tweet").id("1").build(); Index index1Duplicate = new Index.Builder(source).index("twitter").type("tweet").id("1").build(); assertEquals(index1, index1Duplicate); }
@Test public void equalsReturnsFalseForDifferentSources() { Index index1 = new Index.Builder(new Object()).index("twitter").type("tweet").id("1").build(); Index index2 = new Index.Builder(new Object()).index("twitter").type("tweet").id("1").build(); assertNotEquals(index1, index2); }