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