Calculator { public double add(double firstOperand, double secondOperand) { return firstOperand + secondOperand; }  double add(double firstOperand, double secondOperand); double sub(double firstOperand, double secondOperand); double div(double firstOperand, double secondOperand); double mul(double firstOperand, double secondOperand); double pow(double firstOperand, double secondOperand);  }
@Test public void addTwoNumbers() { double resultAdd = mCalculator.add(1d, 1d); assertThat(resultAdd, is(equalTo(2d))); }
@Test public void addTwoNumbersNegative() { double resultAdd = mCalculator.add(-1d, 2d); assertThat(resultAdd, is(equalTo(1d))); }
@Test public void addTwoNumbersWorksWithNegativeResult() { double resultAdd = mCalculator.add(-1d, -17d); assertThat(resultAdd, is(equalTo(-18d))); }
@Test public void addTwoNumbersFloats() { double resultAdd = mCalculator.add(1.111d, 1.111d); assertThat(resultAdd, is(equalTo(2.222))); }
@Test public void addTwoNumbersBignums() { double resultAdd = mCalculator.add(123456781d, 111111111d); assertThat(resultAdd, is(equalTo(234567892d))); }
@Test public void addTwoNumbersFloats() { double resultAdd = mCalculator.add(1.111f, 1.111d); assertThat(resultAdd, is(closeTo(2.222, 0.01))); }