Mutable { public T getVal() { return val; } Mutable();  Mutable(T val); void setVal(T val); T getVal(); @Override String toString(); public T val; }
@Test public void constructorWorks() { Mutable<Integer> m = new Mutable<>(2); assertThat(m.getVal(), is(2)); }
@Test public void fieldAccessWorks() { Mutable<Integer> m = new Mutable<>(3); assertThat(m.val, is(3)); m.val = 4; assertThat(m.getVal(), is(4)); }