AccumuloTablet implements Partition { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (null == obj || getClass() != obj.getClass()) { return false; } final AccumuloTablet accumuloTablet = (AccumuloTablet) obj; return new EqualsBuilder() .append(rddId, accumuloTablet.rddId) .append(index, accumuloTablet.index) .append(start, accumuloTablet.start) .append(end, accumuloTablet.end) .append(files, accumuloTablet.files) .isEquals(); } AccumuloTablet(final int rddId,
                          final int index,
                          final String start,
                          final String end); void addRFile(final String rFile); @Override int index(); Text getStartRow(); Text getEndRow(); Set<String> getFiles(); @Override boolean equals(final Object obj); @Override int hashCode();  }
@Test public void testAccumuloTabletHashCodeAndEquals() { final AccumuloTablet accumuloTablet = new AccumuloTablet(0, 0, "a", "b"); final AccumuloTablet expected = new AccumuloTablet(0, 0, "a", "b"); assertTrue(accumuloTablet.equals(expected)); }