IntegerHolder extends AbstractValueHolder { @Override public Integer getInteger() { return value != null ? Integer.valueOf(intValue()) : null; } IntegerHolder(Long value); @Override Long getValue(); @Override int intValue(); @Override long longValue(); @Override BigDecimal getBigDecimal(); @Override Integer getInteger(); @Override Long getLong();  }
@Test public void testGetInteger() { assertEquals(new Integer(long1.intValue()), h1.getInteger()); assertEquals(new Integer(long2.intValue()), h2.getInteger()); assertEquals(null, h3.getInteger()); }