### Question:
Alterable { public void setMax(int max) { this.max = max; if (this.max < Alterable.MIN) { this.max = Alterable.MIN; } set(cur); } Alterable(int max);  Alterable(int max, boolean overMax); int increase(double extrp, int increase); int increase(int increase); int decrease(double extrp, int decrease); int decrease(int decrease); void fill(); void reset(); void set(int value); void setMax(int max); int getMax(); int getCurrent(); int getPercent(); int getNeeded(int value); boolean isFull(); boolean isEmpty(); boolean isEnough(int value); static final int MIN; }### Answer:
@Test void testSetMax() { final Alterable alterable = new Alterable(0); alterable.set(1); assertEquals(0, alterable.getCurrent()); alterable.setMax(2); alterable.set(1); assertEquals(1, alterable.getCurrent()); alterable.setMax(0); assertEquals(0, alterable.getCurrent()); alterable.setMax(-1); assertEquals(0, alterable.getCurrent()); assertEquals(0, alterable.getMax()); }