@Test public void testMutate(){ MutableByte num = MutableByte.of(twenty); Stream.of(1,2,3,4).map(i->i*10).peek(i-> num.mutate(n->new Byte((byte)(n+i)))).forEach(System.out::println); assertThat(num.getAsByte(),is((byte)120)); } @Test
@Test public void testMutate(){ MutableByte num = MutableByte.of(twenty); Stream.of(1,2,3,4).map(i->i*10).peek(i-> num.mutate(n->new Byte((byte)(n+i)))).forEach(System.out::println); assertThat(num.getAsByte(),is((byte)120)); } @Test