Calculator { public double div(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 divTwoNumbers() { double resultDiv = mCalculator.div(32d,2d); assertThat(resultDiv, is(equalTo(16d))); }
@Test(expected = IllegalArgumentException.class) public void divDivideByZeroThrows() { mCalculator.div(32d,0d); }
@Test public void divTwoNumbers() { double resultDiv = mCalculator.div(2d, 1d); assertThat(resultDiv, is(equalTo(2d))); }
@Test public void divByZero() { double resultDiv = mCalculator.div(32d,0); assertThat(resultDiv, is(equalTo(Double.POSITIVE_INFINITY))); }
@Test public void divZeroByZero() { double resultDiv = mCalculator.div(0,0); assertThat(resultDiv, is(equalTo(Double.NaN))); }