@Test public void addNullExpectedNullPointerException() { AddMashine sut = new AddMashine(0L); try { sut.add(null); throw new RuntimeException("An exception is expected"); }catch(NullPointerException e) { } }
public void add(Long value) { this.value += value; this.addedNumbers++; }
AddMashine { public void add(Long value) { this.value += value; this.addedNumbers++; } }
AddMashine { public void add(Long value) { this.value += value; this.addedNumbers++; } AddMashine(Long initialValue); }
AddMashine { public void add(Long value) { this.value += value; this.addedNumbers++; } AddMashine(Long initialValue); void add(Long value); void sub(Long value); Long getSum(); BigDecimal getAverage(); }
AddMashine { public void add(Long value) { this.value += value; this.addedNumbers++; } AddMashine(Long initialValue); void add(Long value); void sub(Long value); Long getSum(); BigDecimal getAverage();  }