@Test
public void testSetMax() {

    test.set(5);
    assertEquals(5, test.get().intValue());
    test.setMax(10);
    assertEquals(10, test.getMax().intValue());
    assertEquals(5, test.get().intValue());
    test.setMax(4);
    assertEquals(4, test.getMax().intValue());
    assertEquals(4, test.get().intValue());
    test.setMax(null);
    assertNull(test.getMax());
    assertEquals(4, test.get().intValue());
}