LongDiffNullArrayEdges extends ConfigurableOutEdges<LongWritable, NullWritable> implements ReuseObjectsOutEdges<LongWritable, NullWritable>,
    MutableOutEdges<LongWritable, NullWritable>, Trimmable { @Override public void initialize( Iterable<Edge<LongWritable, NullWritable>> edgeIterator ) { edges.initialize(); EdgeIterables.initialize(this, edgeIterator); edges.trim(); }  @Override void setConf(ImmutableClassesGiraphConfiguration
                      <LongWritable, Writable, NullWritable> conf); @Override void initialize(
    Iterable<Edge<LongWritable, NullWritable>> edgeIterator
  ); @Override void initialize(int capacity); @Override void initialize(); @Override void add(Edge<LongWritable, NullWritable> edge); @Override void remove(LongWritable targetVertexId); @Override int size(); @Override Iterator<Edge<LongWritable, NullWritable>> iterator(); @Override Iterator<MutableEdge<LongWritable, NullWritable>> mutableIterator(); @Override void write(DataOutput out); @Override void readFields(DataInput in); @Override void trim();  }
@Test(expected=IllegalStateException.class) public void testFailSafeOnPotentialOverflow() { LongDiffNullArrayEdges edges = getEdges(); List<Edge<LongWritable, NullWritable>> initialEdges = Lists.newArrayList( createEdge(5223372036854775807L), createEdge(-4223372036854775807L)); edges.initialize(initialEdges); }
@Test public void testAvoidOverflowWithZero() { LongDiffNullArrayEdges edges = getEdges(); List<Edge<LongWritable, NullWritable>> initialEdges = Lists.newArrayList( createEdge(5223372036854775807L), createEdge(-4223372036854775807L), createEdge(0)); edges.initialize(initialEdges); assertEdges(edges, -4223372036854775807L, 0, 5223372036854775807L); }