A little bit overkill example how to create a calculator object with Cucumber and Spring to showcase how to work with Spring beans in the Cucumber context.
See calculator.feature for the example and ctrl-click (in IDE) on the steps to navigate through the corresponding Java codes.
Notes: The example was made with IntelliJ IDEA with Cucumber plugins activated.