@Test
public void testLevelToPositive() throws Exception {

    Number n = new NumberWithGradient(3, 10, 2);
    int expected[] = { 3, 5, 7, 9, 10, 10, 10, 10};
    for(int idx=0; idx<expected.length; idx++) {
        int i = n.intValue();
        log.info("iteration " + idx + " value="+i);
        Assert.assertEquals("Invalid value at iteration " + idx, expected[idx], i);
    }
}