DeltaLong extends Delta { public DeltaLong(long base, long delta) { this.base = base; this.delta = delta; } DeltaLong(long base, long delta); static Number deltaOrLong(Number base, long delta); @Override Delta add(Delta other); @Override Number add(Number other); long getBase(); long getDelta(); @Override Long getDeltaValue(); @Override Long getFullValue(); @Override long longValue(); @Override int intValue(); @Override float floatValue(); @Override double doubleValue(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testDeltaLong() { DeltaLong dl = new DeltaLong(100, 123); assertEquals(100, dl.getBase()); assertEquals(123, dl.getDelta()); assertEquals(223, dl.longValue()); assertEquals(223, dl.intValue()); assertEquals(223f, dl.floatValue(), 0.0f); assertEquals(223d, dl.doubleValue(), 0.0d); assertEquals(Long.valueOf(223), dl.getFullValue()); assertEquals(Long.valueOf(123), dl.getDeltaValue()); assertEquals("223", dl.toString()); }