Calculator { public Calculator multiply(double value) { state = state * value; return this; }  Calculator add(double value); Calculator subtract(double value); Calculator multiply(double value); Calculator divide(double value); Calculator divideWithException(double value); void resetCalc(); double value();  }
@Test(groups = { "test" }) public void testMultiply() { calculator.add(5).multiply(2); assertThat(calculator.value(), equalTo(10.0)); }